コード例 #1
0
ファイル: Call.php プロジェクト: scr-be/wonka-library
 /**
  * Validate the requested object instance or class name exists.
  *
  * @param string        $method The method name
  * @param string|object $object The object instance or class name
  * @param bool          $static Whether this is a static call or not
  *
  * @internal
  *
  * @throws BadFunctionCallException
  *
  * @return string|array
  */
 private static function validateMethod($method, $object, $static)
 {
     $callable = $static ? $object . '::' . $method : [$object, $method];
     if (method_exists($object, $method) && is_callable($callable)) {
         return $callable;
     }
     throw BadFunctionCallException::create('Could not validate call method.');
 }