Retrieves facade items
If object is specified, it will filter out items by isApplicable interface

@param null|object $object
@return EcomDev_Varnish_Model_ApplicableInterface[]
509410
public function items($object = null)
    {
        if (!$this->_items) {
            $this->_initItems();
        }
        
        $items = array();
        
        foreach ($this->_items as $item) {
            if ($object !== null && !$item->isApplicable($object)) {
                continue;
            }
            
            $items[] = $item;
        }
        
        return $items;
    }
847299
public static function getProperties(
        ?object $object,
        ?string $classOverride = null,
        ?int $propertyType = null
    ): array {
        $reflectionClass = self::getReflectionClass($object, $classOverride);
        $properties = [];
        $reflectionProperties = $reflectionClass->getProperties($propertyType);
        foreach ($reflectionProperties as $property) {
            $property->setAccessible(true);
            $properties[$property->getName()] = $property->getValue($object);
        }
        return $properties;
    }
1258422
static function getObjectProperties($object, bool $includeStatic = true): array
    {
        $properties = [];

        try {
            $filter =
                \ReflectionProperty::IS_PUBLIC
                | \ReflectionProperty::IS_PROTECTED
                | \ReflectionProperty::IS_PRIVATE;

            $parentFilter = \ReflectionProperty::IS_PRIVATE; // only fetch private parent properties

            $reflection = new \ReflectionObject($object);
            foreach ($reflection->getProperties($filter) as $property) {
                if (!$includeStatic && $property->isStatic()) {
                    continue;
                }

                $properties[$property->getName()] = $property;
            }

            foreach (class_parents($object) as $parentClass) {
                $reflection = new \ReflectionClass($parentClass);

                foreach ($reflection->getProperties($parentFilter) as $property) {
                    if (
                        ($includeStatic || !$property->isStatic())
                        && !key_exists($name = $property->getName(), $properties)
                    ) {
                        $properties[$name] = $property;
                    }
                }
            }
        } catch (\ReflectionException $e) {
            // some objects may not be fully accessible (e.g. instances of internal classes)
        }

        return $properties;
    }
1328962
public function extract($object): array
    {
        if (!is_object($object)) {
            throw new RuntimeException(
                sprintf('%s expects the provided $object to be a PHP object', __METHOD__)
            );
        }

        return (function (): array {
            return get_object_vars($this);
        })->call($object);
    }
369339
public static function query($object = null)
    {
        if($object)
        {
            $class = BeanFactory::getObjectClass($object);
        }
        else
        {
            $class = static::__getRealClassName();
        }
        return Db::query(ModelManager::getDbPoolName($class), $class)->table(ModelManager::getTable($class));
    }
1321636
public function readObject($object = null)
    {
        if ($object === null) {
            $object = array();
        }

        while (true) {
            $key        = $this->_stream->readUTF();
            $typeMarker = $this->_stream->readByte();
            if ($typeMarker != Zend_Amf_Constants::AMF0_OBJECTTERM ){
                //Recursivly call readTypeMarker to get the types of properties in the object
                $object[$key] = $this->readTypeMarker($typeMarker);
            } else {
                //encountered AMF object terminator
                break;
            }
        }
        $this->_reference[] = $object;
        return (object) $object;
    }
967301
protected function getSetters($object)
    {
        // Get the current class
        $class = get_class($object);

        // Check if we have already parsed this class
        if (array_key_exists($class, $this->classMethodsCache) === true) {
            return $this->classMethodsCache[$class];
        }

        // Regex for parsing ReflectionParameter::__toString()
        $regex     = '/\[\s\<(?P<required>[^\>]+)\>\s' .
            '(?:(?P<typehint_a>[^\s]+|(?P<typehint_b>[^\s]+)\sor\s(?P<typehint_c>[^\s]+))\s)?' .
            '(?P<variable>\$[^\s]+)\s(?:=\s(?P<default>[^\]]+)\s)?\]/';

        // Make reflection and fetch the methods
        $reflectionClass = new ReflectionClass($object);
        $methods         = $reflectionClass->getMethods(ReflectionMethod::IS_PUBLIC);

        // Make result container
        $setters         = new Collection\Method();

        // Loop through the methods
        foreach ($methods as $method) {
            // We only care about the setters
            if (substr($method->getName(), 0, 3) !== 'set') {
                continue;
            }

            // Get parameter collection
            $parameters = $method->getParameters();

            // We only take care of the first parameter of the setter
            $parameter  = $parameters[0];
            $raw        = (string) $parameter;

            // If we cannot match it we continue
            if (($result = preg_match($regex, $raw, $matches)) === false || $result === 0) {
                continue;
            }

            // Parse the result of the regex
            $required = ($matches['required'] === 'required');
            $variable = $matches['variable'];
            $default  = $required ? null : $matches['default'];
            $typehint = null;

            // Advanced typehint detection
            if (empty($matches['typehint_b']) === false) {
                $typehint = $matches['typehint_b'];
            } else if (empty($matches['typehint_a']) === false){
                $typehint = $matches['typehint_a'];
            }

            // Set the correct default value
            switch ($default) {
                case null:
                case 'NULL':
                    $default = null;
                    break;
                case 'Array':
                    $default = array();
                    break;
                default:
                    $default = trim($default, "'");
                    break;
            }

            // Has it child objects
            $childObject = ($typehint !== null && $typehint !== 'array');

            // Set the results the the response object
            $setters->offsetSet(
                $method->getName(),
                new Entity\Method(
                    $required,
                    $default,
                    $typehint,
                    $childObject
                )
            );
        }

        // Return the just generated response
        return $this->classMethodsCache[$class] = $setters;
    }
661192
public static function convertSumupObjectToArray($object)
    {
        $results = [];
        foreach ($object->_keys as $property) {
            $v = $object->{$property};
            if ($v instanceof SumupObject) {
                $results[$property] = $v->__toArray();
            } elseif (is_array($v)) {
                $results[$property] = self::convertSumupObjectToArray($v);
            } else {
                $results[$property] = $v;
            }
        }
        return $results;
    }
1174152
public function extract($object)
    {
        $array = array();
        $properties = get_class_vars(get_class($object));
        foreach ($properties as $property => $value) {
            $key = StringUtil::snake($property);
            $array[$key] = $object->{$property};
        }

        return $array;
    }
1218904
public static function getExtractPropertys($object)
    {
        $list = AnnotationManager::getPropertiesAnnotations(BeanFactory::getObjectClass($object), ExtractProperty::class);
        if(null !== $list)
        {
            return $list;
        }
        else
        {
            return [];
        }
    }
1190405
protected function normalizeAsArray($object) : array
    {
        $wrapper = $this->factory->make($object);

        $value = $wrapper->getEntityAttributes();

        if ($this->asJson) {
            $value = json_encode($value);
        }

        return [$this->relation => $value];
    }
1027765
public function getCustomFields($object)
    {
        $customFields = [];
        foreach ($object->getCustomFields() as $field) {
            $customFields[$field->getInternalFieldName()] = $field->getValue();
        }

        return $customFields;
    }
828335
public static function classInheritance($object){

        $class = new ReflectionClass($object);
        $classNames = [$class->getName()];

        while($class = $class->getParentClass()){
            $classNames[] = $class->getName();
        }

        return $classNames;

    }
1088260
public function getObjectIdentity($object)
    {
        foreach ($this->configurations as $config) {
            if ($config->isRelevant($object)) {
                return $config->getObjectIdentity();
            }
        }

        return null;
    }
666881
public function get(string $object)
    {
        return ($this->exists($object)) ? $this->registry[$object] : null;
    }
63117
public function toArray($object)
    {
        $result = array();
        $className = $this->getFullClassName($object);
        $metadata = $this->metadataFactory->getMetadataForClass($className);
        foreach ($metadata->getProperties() as $property) {
            if (!$property->isExpose() || $this->propertySkipper->shouldSkip($property)) {
                continue;
            }

            $value = $this->exposeValue($object, $property);
            $value = $this->handleValue($value, $property, self::DIRECTION_SERIALIZE);

            if ($property->isNullSkipped() && $value === null) {
                continue;
            }

            $result[$property->getSerializedName()] = $value;
        }

        return $result;
    }
483700
public static function args($object) : array
    {
        if (!is_object($object)) {
            throw new InvalidArgumentException('Argument must be'
                . ' an object ' . gettype($object) . ' found.');
        }

        $reflector = new ReflectionClass($object);

        $constructor = $reflector->getConstructor();

        if ($constructor instanceof ReflectionMethod) {
            $args = array_column($constructor->getParameters(), 'name');
        } else {
            $args = [];
        }

        return $args;
    }