function author($new = null, $return_entity = false)
    {
        if (isset($new)){
            if ($new instanceof Entity){
                $this->_author = $new;
                $new = $new->uri();
            }else{
                $this->_author = null; // for reloading
            }
            if ($new != $this->_attributes['author']){
                $this->change('author', $new);
            }
        }
        if ($return_entity){
            if (!isset($this->_author)){
                if (isset($this->_attributes['author'])){
                    $this->_author = Data::read($this->_attributes['author']);
                }else{
                    $this->_author = false;
                }
            }
            return $this->_author;
        }
        return $this->_attributes['author'];
    }
function author($new = null, $return_entity = false)
    {
        if (isset($new)){
            if ($new instanceof Entity){
                $this->_author = $new;
                $new = $new->uri();
            }else{
                $this->_author = null; // for reloading
            }
            if ($new != $this->_attributes['author']){
                $this->change('author', $new);
            }
        }
        if ($return_entity){
            if (!isset($this->_author)){
                if (isset($this->_attributes['author'])){
                    $this->_author = Data::read($this->_attributes['author']);
                }else{
                    $this->_author = false;
                }
            }
            return $this->_author;
        }
        return $this->_attributes['author'];
    }
function author ( $ new = null , $ return_entity = false ) { if ( isset ( $ new ) ) { if ( $ new instanceof Entity ) { $ this -> _author = $ new ; $ new = $ new -> uri ( ) ; } else { $ this -> _author = null ; // for reloading } if ( $ new != $ this -> _attributes [ 'author' ] ) { $ this -> change ( 'author' , $ new ) ; } } if ( $ return_entity ) { if ( ! isset ( $ this -> _author ) ) { if ( isset ( $ this -> _attributes [ 'author' ] ) ) { $ this -> _author = Data :: read ( $ this -> _attributes [ 'author' ] ) ; } else { $ this -> _author = false ; } } return $ this -> _author ; } return $ this -> _attributes [ 'author' ] ; }
Author of this object
@param null|string|Entity $new Новый автор. URI или объект
@param bool $return_entity Признак, возвращать объект вместо uri
@return mixed
Author of this object