Doctrine\OXM\OXMException::typeExists PHP 메소드

typeExists() 공개 정적인 메소드

public static typeExists ( $name )
    public static function typeExists($name)
    {
        return new self("Type '{$name}' already exists");
    }

Usage Example

예제 #1
0
파일: Type.php 프로젝트: doctrine/oxm
 /**
  * Adds a custom type to the type map.
  *
  * @static
  * @param string $name Name of the type. This should correspond to what getName() returns.
  * @param string $className The class name of the custom type.
  * @throws OXMException
  */
 public static function addType($name, $className)
 {
     if (isset(self::$_typesMap[$name])) {
         throw OXMException::typeExists($name);
     }
     self::$_typesMap[$name] = $className;
 }