src/Policy/OrmResolver.php
protected function getEntityPolicy(EntityInterface $entity)
    {
        $class = get_class($entity);
        $entityNamespace = '\Model\Entity\\';
        $namespace = str_replace('\\', '/', substr($class, 0, strpos($class, $entityNamespace)));
        $name = substr($class, strpos($class, $entityNamespace) + strlen($entityNamespace));

        return $this->findPolicy($class, $name, $namespace);
    }
protected function getEntityPolicy(EntityInterface $entity)
    {
        $class = get_class($entity);
        $entityNamespace = '\Model\Entity\\';
        $namespace = str_replace('\\', '/', substr($class, 0, strpos($class, $entityNamespace)));
        $name = substr($class, strpos($class, $entityNamespace) + strlen($entityNamespace));

        return $this->findPolicy($class, $name, $namespace);
    }
protected function getEntityPolicy ( EntityInterface $ entity ) { $ class = get_class ( $ entity ) ; $ entityNamespace = '\Model\Entity\\' ; $ namespace = str_replace ( '\\' , '/' , substr ( $ class , 0 , strpos ( $ class , $ entityNamespace ) ) ) ; $ name = substr ( $ class , strpos ( $ class , $ entityNamespace ) + strlen ( $ entityNamespace ) ) ; return $ this -> findPolicy ( $ class , $ name , $ namespace ) ; }
Get a policy for an entity

@param \Cake\Datasource\EntityInterface $entity The entity to get a policy for
@return object
Get a policy for an entity