src/Policy/OrmResolver.php
protected function getRepositoryPolicy(RepositoryInterface $table)
    {
        $class = get_class($table);
        $tableNamespace = '\Model\Table\\';
        $namespace = str_replace('\\', '/', substr($class, 0, strpos($class, $tableNamespace)));
        $name = substr($class, strpos($class, $tableNamespace) + strlen($tableNamespace));

        return $this->findPolicy($class, $name, $namespace);
    }
protected function getRepositoryPolicy(RepositoryInterface $table)
    {
        $class = get_class($table);
        $tableNamespace = '\Model\Table\\';
        $namespace = str_replace('\\', '/', substr($class, 0, strpos($class, $tableNamespace)));
        $name = substr($class, strpos($class, $tableNamespace) + strlen($tableNamespace));

        return $this->findPolicy($class, $name, $namespace);
    }
protected function getRepositoryPolicy ( RepositoryInterface $ table ) { $ class = get_class ( $ table ) ; $ tableNamespace = '\Model\Table\\' ; $ namespace = str_replace ( '\\' , '/' , substr ( $ class , 0 , strpos ( $ class , $ tableNamespace ) ) ) ; $ name = substr ( $ class , strpos ( $ class , $ tableNamespace ) + strlen ( $ tableNamespace ) ) ; return $ this -> findPolicy ( $ class , $ name , $ namespace ) ; }
Get a policy for a table

@param \Cake\Datasource\RepositoryInterface $table The table/repository to get a policy for.
@return object
Get a policy for a table