protected function assertSupported(CompositableInterface $entity)
    {
        if (!is_object($entity) || !is_a($entity, $this->class)) {
            throw new CompositorException(sprintf(
                "Only instances of '%s' supported, '%s' given",
                $this->class,
                is_object($entity) ? get_class($entity) : gettype($entity)
            ));
        }
    }
protected function assertSupported(CompositableInterface $entity)
    {
        if (!is_object($entity) || !is_a($entity, $this->class)) {
            throw new CompositorException(sprintf(
                "Only instances of '%s' supported, '%s' given",
                $this->class,
                is_object($entity) ? get_class($entity) : gettype($entity)
            ));
        }
    }
protected function assertSupported ( CompositableInterface $ entity ) { if ( ! is_object ( $ entity ) || ! is_a ( $ entity , $ this -> class ) ) { throw new CompositorException ( sprintf ( "Only instances of '%s' supported, '%s' given" , $ this -> class , is_object ( $ entity ) ? get_class ( $ entity ) : gettype ( $ entity ) ) ) ; } }
Assert that given entity supported by composition.

@param CompositableInterface $entity

@throws CompositorException
Assert that given entity supported by composition .