Retrieves instance public/protected properties

@param \ReflectionClass $originalClass
@param integer          $filter

@return \ReflectionProperty[]
350602
protected function getProperties(\ReflectionClass $originalClass, $filter = null)
    {
        return array_filter(
            $originalClass->getProperties($filter),
            function (\ReflectionProperty $property) {
                return ! $property->isStatic();
            }
        );
    }
922886
public function getAll($filter = null)
    {
        $className = self::getEntitiesClassName();
        $results = $this->getDataSource()->retrieveAll($filter);

        // Convert the resulting data to entities.
        $entities = array();
        foreach ($results as $data) {
            $id = @$data['id'];
            $entity = $this->getEntity($id);
            if (empty($entity)) {
                $entity = new $className($data);
            }
            $entities[] = $entity;
        }

        return $entities;
    }
717849
public function getFilterConfig($filter)
    {
        if (!$this->hasFilter($filter)) {
            throw new Exception("No such filter '$filter' exists.");
        }

        return isset($this->config[$filter])
            ? $this->config[$filter]
            : [];
    }
644613
public static function getKeys($filter = []): array
    {
        /* @var $class LightModel */
        $className = get_called_class();
        $class = new $className;
        $tableKey = $class->getKeyName();

        $sql = 'SELECT ' . $tableKey . ' FROM ' . $class->getTableName() . ' WHERE 1=1';
        $params = self::handleFilter($sql, $filter, $class);

        $query = DB::getConnection()->prepare($sql);
        $query->execute($params);

        $res = [];

        foreach ($query->fetchAll() as $key => $value)
        {
            $res[] = $value[0];
        }

        return $res;
    }
1154571
function(filter) {
        var result = [];
        for (var i in this.proto) {
            if (typeof (this.proto[i]) === 'function' && JOII.Compat.indexOf(JOII.InternalPropertyNames, i) === -1) {
                result.push(new JOII.Reflection.Method(this, i));
            }
        }
        return result;
    }
366436
public function filter(/*Callable*/ $filter)
    {
        $result = clone $this;
        foreach ($this as $object)
        {
            if (call_user_func($filter, $object) === false) {
                $result->remove($object);
            }
        }

        return $result;
    }
286548
protected static function parseParameterFilter($filter)
	{
		list($name, $parameters) = explode(':', $filter, 2);

		return array($name, explode(',', $parameters));
	}
1176035
protected function getUserAnnouncementsFilter(string $filter = null)
    {
        $mappingConfiguration = new PropertyMappingConfiguration();
        return $this->convertAnnouncementsFilter($mappingConfiguration, $filter);
    }
693602
public function toArray($filter = ReflectionProperty::IS_PROTECTED)
    {
        $objectArray = [];

        // Get all properties
        $ref = new ReflectionClass($this);
        $properties = $ref->getProperties($filter);
        foreach ($properties as $property) {
            $propertyName = $property->getName();
            if (isset($this->$propertyName)) {
                $objectArray[$propertyName] = $this->$propertyName;
            }
        }

        return $objectArray;
    }
225293
public function getAll($filter = null, Subject $parent = null)
    {
        return $this->connector->getAll(__NAMESPACE__, $filter, $parent);
    }
23421
public function getProperties($value, ReflectionClass $class, $propertyFilter)
	{
		$properties = [];

		foreach (self::$appProperties as $property)
		{
			try
			{
				$val = $value->$property();

				if ( ! is_null($val)) $properties[$property] = $val;
			}
			catch (Exception $e)
			{
				//
			}
		}

		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;
    }
620668
public function getMethods($filter = null)
    {
        if ($this->methods === null) {
            // lazy load class methods list
            $this->methods = array();
            foreach ($this->node->stmts as $stmt) {
                if ($stmt instanceof Node\Stmt\ClassMethod) {
                    $stmt->setAttribute('fileName', $this->getFileName());
                    $this->methods[$stmt->name] = new MethodModel($this, $stmt);
                }
            }
        }

        if (isset($filter)) {
            // @TODO must implement the filter feature
            $methods =& $this->methods;
        } else {
            $methods =& $this->methods;
        }

        return array_values($methods);
    }
744079
private static function getProperties($class): array
    {
        $reflect = new \ReflectionClass($class);
        $prop = $reflect->getProperties(
            \ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED | \ReflectionProperty::IS_PRIVATE
        );
        $properties = [];
        foreach ($prop as $property) {
            $properties[] = $property->name;
        }
        $parent = \get_parent_class($class);
        if ($parent) {
            $properties = \array_merge(self::getProperties($parent), $properties);
        }
        return $properties;
    }
1127004
protected function getAnnouncementsFilter(string $filter = null)
    {
        $mappingConfiguration = new PropertyMappingConfiguration();
        $mappingConfiguration->setTypeConverter($this->typeConverterObjectConverter);
        $mappingConfiguration->setTypeConverterOption(\RGU\Dvoconnector\Property\TypeConverter\ObjectConverter::class, \RGU\Dvoconnector\Property\TypeConverter\ObjectConverter::CONFIGURATION_OBJECT, $this->getDefaultAnnouncementsFilter());

        return $this->convertAnnouncementsFilter($mappingConfiguration, $filter);
    }
954947
public function get_filter_values($filter) {
        if ($allvalues = (array) $this->get_config('filtervalues')) {
            if (isset($allvalues[$filter])) {
                return $allvalues[$filter];
            }
        }

        return [];
    }
691174
public function get($key, $default = null, $filter = null)
    {
        $result = $default;
        if ($this->has($key)) {
            $result = $this->offsetGet($key);
        }

        return $this->filter($result, $filter);
    }