Создает экземпляр обычного свойства для указанного объекта
@param IObject $object объект
@param CounterField $field поле типа данных
@return ICounterProperty
345345
protected function createCounterProperty(IObject $object, CounterField $field)
    {
        $property = $this->getPrototype(
            $this->defaultCounterPropertyClass,
            ['umi\orm\object\property\calculable\ICounterProperty']
        )
        ->createInstance([$object, $field]);

        return $property;
    }
247768
protected function object_to_array_internal($object, $fields){
        $var= array();
        $reflection= new Reflection($object);
        foreach ($fields as $key => $value) {
            if(is_array($value)){
                $var[$key]= $this->object_to_array($reflection->getProperty($key), $fields[$key]);
            }else{
                if(is_string($key) && is_string($value)){
                    $var[$key]= $reflection->getProperty($value);
                }else{
                    $var[$value]= $reflection->getProperty($value);
                }
            }
        }
        return $var;
    }
878102
protected function createLocalizedProperty(IObject $object, ILocalizableField $field, $localeId)
    {
        $property = $this->getPrototype(
            $this->defaultLocalizedPropertyClass,
            ['umi\orm\object\property\localized\ILocalizedProperty']
        )
        ->createInstance([$object, $field, $localeId]);

        return $property;
    }
604970
public function retornaComentariosAtributos($object)
    {
        $arrAttrNames = self::pegaAtributosDoObjeto($object);
        $arrAttrComm  = array();
        
        $iterator = 0;
        $limit    = count($arrAttrNames);
        for ($iterator; $iterator < $limit; $iterator++) {

            $reflectionAttr = new ReflectionProperty($object, $arrAttrNames[$iterator]);

            $arrAttrComm[$arrAttrNames[$iterator]] = $reflectionAttr->getDocComment();
        }

        /**
         * @todo FAZER O FOR PARA PEGAR TODOS ATRIBUTOS, PASSAR NO SEGUNDO PARAMETRO;
         */
        return $arrAttrComm;
    }
531982
public function addNewInstance($object, FieldDescriptionInterface $fieldDescription)
    {
        $instance = $fieldDescription->getAssociationAdmin()->getNewInstance();
        $mapping = $fieldDescription->getAssociationMapping();

        $method = sprintf('add%s', Inflector::classify($mapping['fieldName']));

        if (!method_exists($object, $method)) {
            $method = rtrim($method, 's');

            if (!method_exists($object, $method)) {
                $method = sprintf('add%s', Inflector::classify(Inflector::singularize($mapping['fieldName'])));

                if (!method_exists($object, $method)) {
                    throw new \RuntimeException(
                        sprintf('Please add a method %s in the %s class!', $method, ClassUtils::getClass($object))
                    );
                }
            }
        }

        $object->$method($instance);
    }
321929
public function getPropForkObject(object $object): object {
		return $this->getObjectPropertyAccessProxy()->getValue($object) 
				?? ReflectionUtils::createObject($this->getEntityProperty(true)
						->getEmbeddedEntityPropertyCollection()->getClass());
	}
973738
public function updateOperation($id, $counterId, Models\Operation $operation)
    {
        $resource = 'counter/' . $counterId . '/operation/' . $id;
        $response = $this->sendPutRequest($resource, ["operation" => $operation->toArray()]);
        $operationsResponse = new Models\UpdateOperationResponse($response);
        return $operationsResponse->getOperation();
    }
550300
public function object($field, $key)
    {
        $argStrs = ['ARGV[1]', 'ARGV[2]'];
        $args = [$field, $key];

        $argStr = implode(',', $argStrs);

        $result = $this->eval(<<<STR
return redis.call('object', {$argStr}) 
STR
        , $args);

        return $result;
    }
494775
public function eq($field, $value)
    {
        return function ($object) use ($field, $value) {
            return ClosureExpressionBuilder::getObjectFieldValue($object, $field) === $value;
        };
    }
68656
private function getReflectionProperty($object, $property)
    {
        if (isset($this->properties[$key = $this->getCacheKey($object, $property)])) {
            return $this->properties[$key];
        }

        $reflection = new \ReflectionProperty($object, $property);
        $reflection->setAccessible(true);

        return $this->properties[$key] = $reflection;
    }
1368315
private function updateFieldDefinition(FieldDefinitionObject $field)
    {
        $definition = $this->contentTypeService->newFieldDefinitionUpdateStruct();
        $field->getMapper()->mapObjectToUpdateStruct($definition);

        return $definition;
    }
30778
public static function getObjectFieldValue($object, $field)
    {
        $op = $value = null;

        $pos = strpos($field, '(');
        if (false !== $pos) {
            list ($op, $field) = explode('(', $field, 2);
            $field = rtrim($field, ')');
        }

        if (isset($object[$field])) {
            $value = $object[$field];
        } else {
            $accessors = array('', 'get', 'is');

            foreach ($accessors as $accessor) {
                $accessor .= $field;

                if (!method_exists($object, $accessor)) {
                    continue;
                }

                $value = $object->{$accessor}();
                break;
            }
        }

        if ($op) {
            $function = 'filter' . ucfirst(strtolower($op));
            if (method_exists(static::class, $function)) {
                $value = static::$function($value);
            }
        }

        return $value;
    }
458648
public static function getProtectedProperty($object, $property)
    {
        $refObject = new \ReflectionObject($object);
        $refProp   = $refObject->getProperty($property);
        $refProp->setAccessible(true);

        return $refProp->getValue($object);
    }
1127513
function Equals(TableObject $object = null)
    {
        if (!$object)
            return false;

        if (get_class($this) == get_class($object))
            return $this->KeyValue() == $object->KeyValue();

        return $this === $object;
    }
862010
protected function convertCounter(Op\CounterOp $op)
    {
        $counterOp = new ProtoBuf\CounterOp();
        $increment = $op->getIncrement();

        $counterOp->setIncrement($increment);

        return $counterOp;
    }
164519
public static function getPropertyValue($object, $property)
    {
        $ref = new \ReflectionClass($object);
        $prop = static::getPrivateProperty($ref, $property);
        $prop->setAccessible(true);
        $value = $prop->getValue($object);
        $prop->setAccessible(false);

        return $value;
    }
1328245
protected function registerLoaded(PersistentObject $object) {
    $oid = $object->getOID();
    $key = $oid->__toString();
    if (self::$isDebugEnabled) {
      self::$logger->debug("New Data:\n".$object->dump());
      self::$logger->debug("Registry before:\n".$this->dump());
    }
    // register the object if it is newly loaded or
    // merge the attributes, if it is already loaded
    $registeredObject = null;
    if (isset($this->loadedObjects[$key])) {
      $registeredObject = $this->loadedObjects[$key];
      // merge existing attributes with new attributes
      if (self::$isDebugEnabled) {
        self::$logger->debug("Merging data of ".$key);
      }
      $registeredObject->mergeValues($object);
    }
    else {
      if (self::$isDebugEnabled) {
        self::$logger->debug("Register loaded object: ".$key);
      }
      $this->loadedObjects[$key] = $object;
      // start to listen to changes if the transaction is active
      if ($this->isActive) {
        if (self::$isDebugEnabled) {
          self::$logger->debug("Start listening to: ".$key);
        }
        $this->observedObjects[$key] = $object;
      }
      $registeredObject = $object;
    }
    if (self::$isDebugEnabled) {
      self::$logger->debug("Registry after:\n".$this->dump());
    }
    return $registeredObject;
  }