/** * @param string $method * @param array $parms * * @return mixed */ public function __call($method, $args) { try { return $this->delay()->soap->__call(ucfirst(Core_Strings::to_camel_case($method)), $args); } catch (SoapException $e) { if (Service_Yandex_Direct::supress_exceptions()) { $this->last_error = $e; return null; } else { throw $e; } } }
/** * Проверяет установку значения свойства * * @param string $property * * @return boolean */ public function __isset($property) { switch ($property) { case 'link': case 'title': case 'description': case 'published_at': $m = $property . '_for'; return $this->protocol->{$m}($this->element) !== null; default: return isset($this->{$property}) || $this->get(Core_Strings::to_camel_case($property, true)) !== null; } }
public function test_to_camel_case() { $this->assertEquals(Core_Strings::to_camel_case('to_camel_case'), 'ToCamelCase'); }
/** * Конвертирует имя свойства * * @param string $property */ protected function attr_name($property) { return Core_Strings::to_camel_case($property, true); }
/** * @param string $name * * @return string */ public function canonicalize($name) { static $names = array(); if (!isset($names[$name])) { $names[$name] = Core_Strings::to_camel_case($name, true); } return $names[$name]; }
/** * Перенаправляет вызовы в стандартный client с учетом CameCase * * @param string $method * @param array $args */ public function __call($method, $args) { return call_user_func_array(array($this->client, Core_Strings::to_camel_case($method)), $args); }