Phpro\SoapClient\CodeGenerator\Rules\RuleInterface::appliesToContext PHP Method

appliesToContext() public method

public appliesToContext ( Phpro\SoapClient\CodeGenerator\Context\ContextInterface $context ) : boolean
$context Phpro\SoapClient\CodeGenerator\Context\ContextInterface
return boolean
    public function appliesToContext(ContextInterface $context);

Usage Example

 /**
  * @param ContextInterface $context
  *
  * @return bool
  */
 public function appliesToContext(ContextInterface $context)
 {
     if (!$context instanceof TypeContext && !$context instanceof PropertyContext) {
         return false;
     }
     $type = $context->getType();
     if (!preg_match($this->regex, $type->getName())) {
         return false;
     }
     return $this->subRule->appliesToContext($context);
 }
All Usage Examples Of Phpro\SoapClient\CodeGenerator\Rules\RuleInterface::appliesToContext