public function load($source, $options = [])
{
$defaults = ['wrap' => false];
$options += $defaults;
$wrap = $options['wrap'];
if ($wrap) {
$source = "<?php {$source}?>";
}
$this->_data = [];
$this->_current = 0;
foreach (token_get_all($source) as $token) {
$this->_data[] = is_array($token) ? $token : [$token, $token, null];
}
if ($wrap) {
$this->_data = array_slice($this->_data, 1, count($this->_data) - 2);
}
$this->_count = count($this->_data);
}