Gc\DocumentType\Model::getUser PHP Method

getUser() public method

Get user model
public getUser ( ) : Model
return Gc\User\Model
    public function getUser()
    {
        if ($this->getData('user') === null and $this->getUserId() != null) {
            $this->setData('user', User\Model::fromId($this->getUserId()));
        }
        return $this->getData('user');
    }

Usage Example

Beispiel #1
0
 /**
  * Test
  *
  * @return void
  */
 public function testGetUser()
 {
     $this->assertInstanceOf('Gc\\User\\Model', $this->object->getUser());
 }