call() 공개 정적인 메소드

__call() implementation.
public static call ( $_this, $name, $args ) : mixed
리턴 mixed
예제 #1
0
 /**
  * Simple gate for Nette object events.
  * @param  string method name
  * @param  array arguments
  * @return mixed
  * @throws MemberAccessException
  */
 public function __call($name, $args)
 {
     if ($name >= 'onA' && $name < 'on_') {
         return ObjectMixin::call($this, $name, $args);
     } else {
         throw new MemberAccessException($name);
     }
 }
예제 #2
0
 public function fireEvent($method, $args = [])
 {
     if (!method_exists($this, $method)) {
         throw new InvalidArgumentException("Event '{$method}' does not exist.");
     }
     $this->eventCheck = FALSE;
     call_user_func_array([$this, $method], $args);
     if (!$this->eventCheck) {
         throw new InvalidStateException("Event '{$method}' was not correctly propagate to overwritten methods.");
     }
     if (property_exists($this, $method)) {
         ObjectMixin::call($this, $method, $args);
     }
 }
예제 #3
0
 /**
  * Callbacks
  * @param string $name
  * @param array $args
  * @return mixed
  * @throws MemberAccessException
  */
 public function __call($name, $args)
 {
     return ObjectMixin::call($this, $name, $args);
 }
예제 #4
0
파일: Repository.php 프로젝트: Vyki/orm
 protected function fireEvent(IEntity $entity, $event)
 {
     if (!property_exists($this, $event)) {
         throw new InvalidArgumentException("Event '{$event}' is not defined.");
     }
     $entity->fireEvent($event);
     ObjectMixin::call($this, $event, [$entity]);
 }
예제 #5
0
파일: Request.php 프로젝트: noikiy/Curl
 /**
  * @param string $name
  * @param array $args
  *
  * @return mixed
  */
 public function __call($name, $args)
 {
     if (method_exists('Nette\\Utils\\ObjectMixin', 'callProperty')) {
         return ObjectMixin::callProperty($this, $name, $args);
     } else {
         return ObjectMixin::call($this, $name, $args);
     }
 }
 /**
  * Call to undefined method.
  *
  * @param string $name
  * @param array $args
  *
  * @throws \Nette\MemberAccessException
  * @return mixed
  */
 public function __call($name, $args)
 {
     if (strpos($name, 'findBy') === 0 || strpos($name, 'findOneBy') === 0) {
         return parent::__call($name, $args);
     }
     return ObjectMixin::call($this, $name, $args);
 }
예제 #7
0
파일: Object.php 프로젝트: manGoweb/mnamGo
 /**
  * Call to undefined method.
  * @param  string  method name
  * @param  array   arguments
  * @return mixed
  * @throws MemberAccessException
  */
 public function __call($name, $args)
 {
     return Nette\Utils\ObjectMixin::call($this, $name, $args);
 }
예제 #8
0
파일: Object.php 프로젝트: kukulich/utils
 /**
  * Call to undefined method.
  * @param  string  method name
  * @param  array   arguments
  * @return mixed
  * @throws MemberAccessException
  */
 public function __call(string $name, array $args)
 {
     return ObjectMixin::call($this, $name, $args);
 }