Overview

Namespaces

  • Pharborist
    • Constants
    • ControlStructures
    • Exceptions
    • Functions
    • Generators
    • Namespaces
    • Objects
    • Operators
    • Types
    • Variables

Classes

  • ArrayLookupNode
  • BacktickNode
  • BlankStatementNode
  • CommaListNode
  • CommentNode
  • DocCommentNode
  • EchoStatementNode
  • EchoTagStatementNode
  • ExpressionStatementNode
  • Filter
  • Formatter
  • FormatterFactory
  • LineCommentBlockNode
  • Node
  • NodeCollection
  • OperatorFactory
  • ParenthesisNode
  • ParentNode
  • Parser
  • PartialCommentNode
  • PartialNode
  • RootNode
  • SourceDiscovery
  • SourcePosition
  • SplatNode
  • StatementBlockNode
  • StatementNode
  • TemplateNode
  • Token
  • TokenIterator
  • Tokenizer
  • TokenNode
  • UnsetStatementNode
  • VisitorBase
  • WhitespaceNode

Interfaces

  • ExpressionNode
  • NodeInterface
  • ParentNodeInterface
  • ParserException
  • VisitorInterface

Traits

  • DocCommentTrait
  • ParenTrait
  • UncommentTrait
  • Overview
  • Namespace
  • Class

Class Filter

Factory for creating common callback filters.

Namespace: Pharborist
Located at Filter.php
Methods summary
public static callable
# any( callable[] $filters )

Callback returns true if any of the callbacks pass.

Callback returns true if any of the callbacks pass.

Parameters

$filters

Returns

callable
public static callable
# all( callable[] $filters )

Callback returns true if all of the callbacks pass.

Callback returns true if all of the callbacks pass.

Parameters

$filters

Returns

callable
public static callable
# isInstanceOf( string $class_name )

Callback to filter for nodes of certain types.

Callback to filter for nodes of certain types.

Parameters

$class_name

... At least one fully-qualified Pharborist node type to search for.

Returns

callable
public static callable
# isFunction( string $function_name )

Callback to filter for specific function declaration.

Callback to filter for specific function declaration.

Parameters

$function_name

... At least one function name to search for.

Returns

callable
public static callable
# isFunctionCall( string $function_name )

Callback to filter for calls to a function.

Callback to filter for calls to a function.

Parameters

$function_name

... At least one function name to search for.

Returns

callable
public static callable
# isClass( string $class_name )

Callback to filter for specific class declaration.

Callback to filter for specific class declaration.

Parameters

$class_name

... At least one class name to search for.

Returns

callable
public static callable
# isClassMethodCall( string $class_name, string $method_name )

Callback to filter for calls to a class method.

Callback to filter for calls to a class method.

Parameters

$class_name
Fully qualified class name or expression string.
$method_name
Method name or expression string.

Returns

callable
Filter callable.
public static callable
# isComment( boolean $include_doc_comment = TRUE )

Callback to filter comments.

Callback to filter comments.

Parameters

$include_doc_comment

Returns

callable
public static callable
# is( Pharborist\Node $match )

Callback to test if match to given node.

Callback to test if match to given node.

Parameters

$match

Returns

callable
public static callable
# isTokenType( integer|string $type )

Callback to test if match to given token type.

Callback to test if match to given token type.

Parameters

$type
Token type.

Returns

callable
public static callable
# isNotHidden( )

Callback to skip whitespace and comments.

Callback to skip whitespace and comments.

Returns

callable
public static callable
# isNewline( )

Callback to match whitespace containing newlines.

Callback to match whitespace containing newlines.

Returns

callable
Pharborist API documentation generated by ApiGen