src/LdapTools/Object/LdapObjectCreator.php
public function create($type)
    {
        if (!is_string($type) && !($type instanceof LdapObjectSchema)) {
            throw new InvalidArgumentException(
                'You must either pass the schema object type as a string to this method, or pass the schema types '
                . 'LdapObjectSchema to this method.'
            );
        }
        if (!($type instanceof LdapObjectSchema)) {
            $type = $this->schemaFactory->get($this->connection->getConfig()->getSchemaName(), $type);
        }
        $this->schema = $type;
        $this->container = $type->getDefaultContainer();

        return $this;
    }
public function create($type)
    {
        if (!is_string($type) && !($type instanceof LdapObjectSchema)) {
            throw new InvalidArgumentException(
                'You must either pass the schema object type as a string to this method, or pass the schema types '
                . 'LdapObjectSchema to this method.'
            );
        }
        if (!($type instanceof LdapObjectSchema)) {
            $type = $this->schemaFactory->get($this->connection->getConfig()->getSchemaName(), $type);
        }
        $this->schema = $type;
        $this->container = $type->getDefaultContainer();

        return $this;
    }
public function create ( $ type ) { if ( ! is_string ( $ type ) && ! ( $ type instanceof LdapObjectSchema ) ) { throw new InvalidArgumentException ( 'You must either pass the schema object type as a string to this method, or pass the schema types ' . 'LdapObjectSchema to this method.' ) ; } if ( ! ( $ type instanceof LdapObjectSchema ) ) { $ type = $ this -> schemaFactory -> get ( $ this -> connection -> getConfig ( ) -> getSchemaName ( ) , $ type ) ; } $ this -> schema = $ type ; $ this -> container = $ type -> getDefaultContainer ( ) ; return $ this ; }
Specify the object type to create. Either by its string name type from the schema of the LdapObjectSchema.

@param string|LdapObjectSchema $type
@return $this
Specify the object type to create . Either by its string name type from the schema of the LdapObjectSchema .