Abstract
ExtendsPhpParser\NodeVisitorAbstract
ChildrenPHPFUI\RefActor\Actor\Classes\Base
PHPFUI\RefActor\Actor\Classes\Classify
PHPFUI\RefActor\Actor\FindAndReplace
PHPFUI\RefActor\Actor\Includes\Add
PHPFUI\RefActor\Actor\Includes\Remove
PHPFUI\RefActor\Actor\Includes\StrayRequireOnce
PHPFUI\RefActor\Actor\NukeCommentedOutCode
ImplementsPhpParser\NodeVisitor
Methods
public PhpParser\NodeVisitorAbstract::afterTraverse(array $nodes)
public PhpParser\NodeVisitorAbstract::beforeTraverse(array $nodes)
public PhpParser\NodeVisitorAbstract::enterNode(PhpParser\Node $node)
public filterNode(PhpParser\Node $node, array $nodeNames) : bool
public getCurrentFile() : string
 

Get the current file being processed

public abstract getDescription() : string
 

Return a markdown compatible description for automated documentation generation

  • return string of markdown
public getPrint() : bool
public abstract getTestCases() : array
 

Return test cases for unit tests and documentation

One test case is required. Additional test cases can be specified for more complete testing.

Each test case should be an array of strings.

  • The first string is the example code that will be Acted on.
  • The second string is the expected result of the Actor
  • Any additional strings will be additional output from RefActor::printToFile
public PhpParser\NodeVisitorAbstract::leaveNode(PhpParser\Node $node)
public setCurrentFile(string $currentFile) : self
 

Sets the $this->currentFile variable once processing has begun. This is called after shouldProcessFile returns true.

public setPrint(bool $print = true) : self
public setRefActor(PHPFUI\RefActor $refActor) : self
 

Called by RefActor when adding an Actor. Allows the Actor to reference the RefActor controller.

public shouldProcessFile(string $file) : bool
 

Called before processing a file. Actor should reset any properties that could be left over from processing previous files.

  • return bool return true to process the file, or false to skip
Properties
protected PHPFUI\RefActor $refActor
Properties
private string $currentFile
private bool $print
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only