src/Represent/Builder/ClassContextBuilder.php
private function handleView(ClassContext $classContext)
    {
        $properties = $classContext->properties;
        $reader     = $this->annotationReader;

        $classContext->properties = array_filter(
            $properties,
            function ($property) use ($reader, $classContext) {
                $annotation = $reader->getPropertyAnnotation($property,'\Represent\Annotations\View');

                return $annotation == null || in_array($classContext->views, $annotation->name);
            }
        );

        return $classContext;
    }
private function handleView(ClassContext $classContext)
    {
        $properties = $classContext->properties;
        $reader     = $this->annotationReader;

        $classContext->properties = array_filter(
            $properties,
            function ($property) use ($reader, $classContext) {
                $annotation = $reader->getPropertyAnnotation($property,'\Represent\Annotations\View');

                return $annotation == null || in_array($classContext->views, $annotation->name);
            }
        );

        return $classContext;
    }
private function handleView ( ClassContext $ classContext ) { $ properties = $ classContext -> properties ; $ reader = $ this -> annotationReader ; $ classContext -> properties = array_filter ( $ properties , function ( $ property ) use ( $ reader , $ classContext ) { $ annotation = $ reader -> getPropertyAnnotation ( $ property , '\Represent\Annotations\View' ) ; return $ annotation == null || in_array ( $ classContext -> views , $ annotation -> name ) ; } ) ; return $ classContext ; }
Takes ClassContext and checks that each property belongs to the given view.
@param \Represent\Context\ClassContext $classContext
@return ClassContext
Takes ClassContext and checks that each property belongs to the given view .