__call() public method

This, in addition to EMongoModels edition, will also call scopes on the model
See also: EMongoModel::__call()
public __call ( string $name, array $parameters ) : EMongoDocument | mixed
$name string
$parameters array
return EMongoDocument | mixed
Exemplo n.º 1
0
 /**
  * Magic will either call a function on the file if it exists or bubble to parent
  * @see EMongoDocument::__call()
  */
 public function __call($name, $parameters)
 {
     if ($this->getFile() instanceof MongoGridFSFile && method_exists($this->getFile(), $name)) {
         return call_user_func_array(array($this->getFile(), $name), $parameters);
     }
     return parent::__call($name, $parameters);
 }