AuthorFactory::create PHP Méthode

create() static public méthode

static public create ( $name )
    static function create($name)
    {
        $author = new Author();
        $author->create(array('name' => $name, 'email' => 'temp@temp' . rand(), 'identity' => rand(), 'confirmed' => true));
        return $author;
    }

Usage Example

Exemple #1
0
 /**
  * @return Author
  */
 public function getAuthor()
 {
     if (!$this->hasData('author')) {
         $this->setData('author', $this->authorFactory->create()->load($this->getAuthorId()));
     }
     return $this->getData('author');
 }
All Usage Examples Of AuthorFactory::create
AuthorFactory