CodeExplorer _lines example
protected function _end_block() { } protected function _lines($lines,
$prefix = ' '
) { foreach ($lines as $line) { echo "
$prefix $line\n";
} } protected function _context($lines) { $this->
_lines($lines);
} protected function _added($lines) { $this->
_lines($lines, '>'
);
} protected function _deleted($lines) { $this->
_lines($lines, '<'
);
} protected function _changed($orig,
$closing) { return implode("\n",
$lines) . "\n";
} else { return implode('',
$lines);
} } function _added($lines) { array_walk($lines, array
(&
$this, '_encode'
));
$lines[0
] =
$this->_ins_prefix .
$lines[0
];
$lines[count($lines) - 1
] .=
$this->_ins_suffix;
return $this->
_lines($lines, ' ', false
);
} function _deleted($lines,
$words = false
) { array_walk($lines, array
(&
$this, '_encode'
));
$lines[0
] =
$this->_del_prefix .
$lines[0
];
$lines[count($lines) - 1
] .=
$this->_del_suffix;
return $this->
_lines($lines, ' ', false
);
} function _changed($orig,
$final) { return '';
} function _lines($lines,
$prefix = ' '
) { return $prefix .
implode("\n
$prefix",
$lines) . "\n";
} function _context($lines) { return $this->
_lines($lines, ' '
);
} function _added($lines) { return $this->
_lines($lines, '> '
);
} function _deleted($lines) { return $this->
_lines($lines, '< '
);
}