LdapTools\Factory\SchemaParserFactory::get PHP Метод

get() публичный статический Метод

public static get ( $type, $schemaFolder )
    public static function get($type, $schemaFolder)
    {
        if (self::TYPE_YML == $type) {
            return new SchemaYamlParser($schemaFolder);
        } else {
            throw new InvalidArgumentException(sprintf('Unknown cache type "%s".', $type));
        }
    }

Usage Example

Пример #1
0
 /**
  * @param LdapConnectionInterface $connection
  * @param EventDispatcherInterface $dispatcher
  */
 public function __construct(LdapConnectionInterface $connection, EventDispatcherInterface $dispatcher)
 {
     $this->connection = $connection;
     $this->dispatcher = $dispatcher;
     $cache = CacheFactory::get(CacheFactory::TYPE_NONE, []);
     $parser = SchemaParserFactory::get(SchemaParserFactory::TYPE_YML, self::SCHEMA_DIR);
     $this->schemaFactory = new LdapObjectSchemaFactory($cache, $parser, $dispatcher);
 }
All Usage Examples Of LdapTools\Factory\SchemaParserFactory::get
SchemaParserFactory