Example #1
0
 /**
  * @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;
         }
     }
 }
Example #2
0
File: Feed.php Project: techart/tao
 /**
  * Проверяет установку значения свойства
  *
  * @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;
     }
 }
Example #3
0
 public function test_to_camel_case()
 {
     $this->assertEquals(Core_Strings::to_camel_case('to_camel_case'), 'ToCamelCase');
 }
Example #4
0
 /**
  * Конвертирует имя свойства
  *
  * @param string $property
  */
 protected function attr_name($property)
 {
     return Core_Strings::to_camel_case($property, true);
 }
Example #5
0
 /**
  * @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];
 }
Example #6
0
 /**
  * Перенаправляет вызовы в стандартный 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);
 }