original_string: public function fromArray(array $object = array())
      {
          if (count($object) > 0) {
              $reflector = new \ReflectionClass($this);
              $properties = InjectorHelper::extractProperties($reflector, \ReflectionProperty::IS_PUBLIC, InjectorHelper::VAR_PATTERN);
              unset($reflector);
              foreach ($object as $key => $value) {
                  if (property_exists($this, $key) && null !== $value) {
                      $this->parseDtoField($properties, $key, $value);
                  }
              }
          }
      }
code: public function fromArray(array $object = array())
      {
          if (count($object) > 0) {
              $reflector = new \ReflectionClass($this);
              $properties = InjectorHelper::extractProperties($reflector, \ReflectionProperty::IS_PUBLIC, InjectorHelper::VAR_PATTERN);
              unset($reflector);
              foreach ($object as $key => $value) {
                  if (property_exists($this, $key) && null !== $value) {
                      $this->parseDtoField($properties, $key, $value);
                  }
              }
          }
      }
code_tokens: public function fromArray ( array $ object = array ( ) ) { if ( count ( $ object ) > 0 ) { $ reflector = new \ ReflectionClass ( $ this ) ; $ properties = InjectorHelper :: extractProperties ( $ reflector , \ ReflectionProperty :: IS_PUBLIC , InjectorHelper :: VAR_PATTERN ) ; unset ( $ reflector ) ; foreach ( $ object as $ key => $ value ) { if ( property_exists ( $ this , $ key ) && null !== $ value ) { $ this -> parseDtoField ( $ properties , $ key , $ value ) ; } } } }
docstring: Hydrate object from array
  @param array $object
docstring_tokens: Hydrate object from array