/** * @param $path * @return \Timiki\Bundle\RpcServerBundle\Server\Mapper * @throws \Timiki\Bundle\RpcServerBundle\Server\Exceptions\InvalidMappingException */ public static function getMapper($path = null) { AnnotationRegistry::registerFile(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'Mapping' . DIRECTORY_SEPARATOR . 'Cache.php'); AnnotationRegistry::registerFile(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'Mapping' . DIRECTORY_SEPARATOR . 'Execute.php'); AnnotationRegistry::registerFile(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'Mapping' . DIRECTORY_SEPARATOR . 'Method.php'); AnnotationRegistry::registerFile(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'Mapping' . DIRECTORY_SEPARATOR . 'Param.php'); AnnotationRegistry::registerFile(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'Mapping' . DIRECTORY_SEPARATOR . 'Roles.php'); $mapper = new Mapper(); if ($path) { $mapper->addPath($path); } return $mapper; }