Overview

Namespaces

  • Deimos
    • CLI
      • Exceptions
  • PHP

Classes

  • Deimos\CLI\CLI
  • Deimos\CLI\Tokenizer
  • Deimos\CLI\Variable

Interfaces

  • Deimos\CLI\InterfaceVariable
  • Throwable

Exceptions

  • Deimos\CLI\Exceptions\CLIRun
  • Deimos\CLI\Exceptions\Required
  • Deimos\CLI\Exceptions\UndefinedAlias
  • Deimos\CLI\Exceptions\UndefinedVariable
  • Exception
  • InvalidArgumentException
  • LogicException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: 
 3: namespace Deimos\CLI;
 4: 
 5: class Tokenizer
 6: {
 7: 
 8:     /**
 9:      * @var string
10:      */
11:     protected $data;
12: 
13:     /**
14:      * Tokenizer constructor.
15:      *
16:      * @param string $data
17:      */
18:     public function __construct($data)
19:     {
20:         $this->data = $data;
21:     }
22: 
23:     /**
24:      * @return array
25:      */
26:     public function run()
27:     {
28:         $rows = token_get_all('<?php ' . $this->data);
29:         array_shift($rows);
30: 
31:         return $rows;
32:     }
33: 
34: }
API documentation generated by ApiGen