Override handler

@param type $object
@return boolean
551810
public function overrideHandle(& $object) {
		$class = get_class($object);
		$class = str_replace('\\', '_', trim($class, '\\'));
		if (isset(self::$override_data[$class]) && self::$override_data[$class] === false) {
			return false;
		}
		// need to fix file path based on PHPUnit
		if (!file_exists('./Overrides')) {
			$filename = './application/Overrides/Class/Override_' . $class . '.php';
		} else {
			$filename = './Overrides/Class/Override_' . $class . '.php';
		}
		if (!file_exists($filename)) {
			self::$override_data[$class] = false;
			return false;
		}
		unset($object_override_blank_object);
		require($filename); // must use require!!!
		$vars = get_object_vars($object_override_blank_object);
		if (empty($vars)) {
			self::$override_data[$class] = false;
			return false;
		} else {
			self::$override_data[$class] = $vars;
		}
		// if we have data we merge it with an object
		if (!empty(self::$override_data[$class])) {
			object_merge_values($object, self::$override_data[$class]);
		}
	}
12199
public function tap($object=null, $interceptor=null) {
    list($object, $interceptor) = self::_wrapArgs(func_get_args(), 2);
    
    $interceptor($object);
    return self::_wrap($object);
  }
1360566
protected function runHandler($object, $data = null)
    {
        /** @var ITypedObject $object */
        /** @var ArrayDataObject $data */
        $input = $data->getArray();

        if ($this->dataSource instanceof IValueObjectCollection) {
            /** @var IValueObject $object */
            /** @var IValueObject $newObject */
            $newObject = $this->form->createNewObjectFromInput($input);

            $this->form->invokeBeforeSubmitCallbacks($newObject, $input);
            $this->form->bindToObject($newObject, $input);
            $this->form->invokeOnSubmitCallbacks($newObject, $input);

            $this->dataSource->update($object, $newObject);

            $this->form->invokeOnSaveCallbacks($object, $input);

            return $newObject;
        } else {
            $this->form->invokeBeforeSubmitCallbacks($object, $input);
            $this->form->bindToObject($object, $input);
            $this->form->invokeOnSubmitCallbacks($object, $input);

            $this->dataSource->save($object);

            $this->form->invokeOnSaveCallbacks($object, $input);

            return $object;
        }
    }
1277843
private function transform($object)
    {
        $class = trim(get_class($object), '\\');
        $transformer = array_key_exists($class, $this->transformers)
            ? $this->transformers[$class]
            : false;
        if (! $transformer) {
            return $this->convert($object);
        }

        return is_callable(($cb = $this->transformer($transformer)))
            ? $this->forceArray(call_user_func($cb, $object))
            : $this->convert($object);
    }
472010
public function checkInstanceOfRestriction($object) : bool
    {
        return empty($this->instanceOf)|| $object instanceOf $this->instanceOf;
    }
56445
public function to(string $type): HandlerInterface
    {
        $type = $this->normalizeType($type);

        if (isset($this->handlers[$type])) {
            $key = $type;
        } elseif ($type === 'integer|float' || $type === 'float|integer') {
            $key = 'number';
        } elseif (strpos($type, '|') !== false) {
            $key = 'multiple';
        } elseif (substr($type, -2) === '[]' || is_a($type, Traversable::class, true)) {
            $key = 'array';
        } else {
            $key = 'object';
        }

        if (!isset($this->handlers[$key])) {
            throw new OutOfBoundsException("Unable to find handler to cast to '$type'");
        }

        return $this->handlers[$key]->forType($type);
    }
632324
public function getHandlerFor(string $type)
    {
        if (empty($this->handlers[$type])) {
            throw new \InvalidArgumentException('There is no handler for the "'.$type.'" criteria type.');
        } elseif (is_object($this->handlers[$type]) && $this->handlers[$type] instanceof CriteriaHandler) {
            return $this->handlers[$type];
        }

        return new $this->handlers[$type];
    }
565729
public function hasCallbackObject($object, $callback = null)
    {
        return isset($this->callbacks[$object]) && ($callback === null || $this->callbacks[$object] === $callback);
    }
1122783
protected function onLoaderHandler($object) {
        $ex = explode('\\',$object);
        $count = count($ex);
        switch (true) {
            case isset($this->namespace[$ex[0]]):
                $path = str_replace($ex[0], $this->namespace[$ex[0]], $object).'.php';
                $path = str_replace('\\', '/', $path);
                $first = substr( $path, 0, 1 );
                if($first !== '/') {
                    $path = __APP__.$path;
                }
                break;
            case $ex[0]=='nb':
                $path = str_replace('nb\\', __NB__, $object).'.php';
                $path = str_replace('\\', '/', $path);
                break;
            case $count == 2:
                $path = __APP__.$this->folder_app.'/'.$ex[0].'/'.$ex[1].'.php';
                if(is_file($path) ) {
                    return include $path;
                }
            default:
                $path = __APP__.str_replace('\\', '/', $object).'.php';
                break;
        }
        is_file($path) and include($path);
    }
381900
public function toResource($object): ResourceObject
    {
        $context = $this->createContext(get_class($object));

        $id   = $this->identifierHandler->getIdentifier($object, $context);
        $type = $this->resolveType($object, $context);

        $resource = new ResourceObject($id, $type);

        foreach ($this->handlers as $handler)
        {
            $handler->toResource($object, $resource, $context);
        }

        return $resource;
    }
1084014
public static function reset($object)
	{
		if (!($object instanceof MethodOptions)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\MethodOptions.');
		}
		$object->deprecated = NULL;
		$object->uninterpretedOption = NULL;
	}
1267844
protected function _lock($object, $lock)
    {
        if ($lock) {
            self::$_locks[$object->getHandle()] = true;
        } else {
            unset(self::$_locks[$object->getHandle()]);
        }
    }
510833
protected function isIgnoredObject($object)
    {
        return in_array(
            strtolower($class = ($parent = get_parent_class($object)) ? $parent : get_class($object)),
            $this->ignoredObjects
        );
    }
386638
private function validateUnderlyingObjectType($object)
    {
        if (count($this->mustBeInstanceOf) == 0) {
            return true;
        }
        foreach ($this->mustBeInstanceOf as $instance) {
            if ($object instanceof $instance) { //|| $object->asa($instance) !== null
                return true;
            }
        }
        Yii::error('Got invalid underlying object type! (' . $object->className() . ')');
        return false;
    }
1302126
public static function isDeleted($object)
    {
        if (true === method_exists($object, 'getDeleted') && true === $object->getDeleted()) {
            return true;
        }

        if (true === method_exists($object, 'isDeleted') && true === $object->isDeleted()) {
            return true;
        }

        return false;
    }
1044885
public function enqueue( ObjectHandlable $object, $priority)
    {
        $result = false;

        if($handle = $object->getHandle())
        {
            $this->__object_list->offsetSet($handle, $object);

            $this->__priority_list->offsetSet($handle, $priority);
            $this->__priority_list->asort();

            if($object instanceof ObjectInterface) {
                $this->__identifier_list[$handle] = $object->getIdentifier();
            }

            $result = true;
        }

        return $result;
    }
925449
private function processDeserializeTypeHandler(Type\Handler $handler, $object, $value): self
    {
        $handler->deserializer()->deserialize($object, $value);

        return $this;
    }