src/Norm/Collection.php
public function schema($key = null, $value = null)
    {
        $numArgs = func_num_args();
        if (0 === $numArgs) {
            return $this->schema;
        } elseif (1 === $numArgs) {
            if (is_array($key)) {
                $this->schema = new NObject($key);
            } elseif ($this->schema->offsetExists($key)) {
                return $this->schema[$key];
            }
        } else {
            $this->schema[$key] = $value;
        }
    }
public function schema($key = null, $value = null)
    {
        $numArgs = func_num_args();
        if (0 === $numArgs) {
            return $this->schema;
        } elseif (1 === $numArgs) {
            if (is_array($key)) {
                $this->schema = new NObject($key);
            } elseif ($this->schema->offsetExists($key)) {
                return $this->schema[$key];
            }
        } else {
            $this->schema[$key] = $value;
        }
    }
public function schema ( $ key = null , $ value = null ) { $ numArgs = func_num_args ( ) ; if ( 0 === $ numArgs ) { return $ this -> schema ; } elseif ( 1 === $ numArgs ) { if ( is_array ( $ key ) ) { $ this -> schema = new NObject ( $ key ) ; } elseif ( $ this -> schema -> offsetExists ( $ key ) ) { return $ this -> schema [ $ key ] ; } } else { $ this -> schema [ $ key ] = $ value ; } }
Getter and setter of collection schema. If there is no argument specified, the method will set and override schema. If argument specified, method will act as getter to specific field schema.

@param string $schema

@return mixed
Getter and setter of collection schema . If there is no argument specified the method will set and override schema . If argument specified method will act as getter to specific field schema .