Read property values or traverse arrays/iterators.

@param mixed $target The entity/array/collection to fetch $field from.
@param string $field The next field to fetch.
@return mixed
500140
protected function _getProp($target, $field)
    {
        if (is_array($target) && isset($target[$field])) {
            return $target[$field];
        }
        if ($target instanceof EntityInterface) {
            return $target->get($field);
        }
        if ($target instanceof Traversable) {
            foreach ($target as $i => $val) {
                if ($i == $field) {
                    return $val;
                }
            }

            return false;
        }
    }
74263
public function getContent(string $field)
    {
        return Arr::get($this->toArray(), $field) ?? Arr::get($this->getRelations(), $field);
    }
436192
public function get($field)
    {
        $client = $this->getClient();

        return $client->hget($this->getKey()->getName(), $field);
    }
879080
public function findValue($field) {
        $row = $this->select($field)->findOne();

        //false or null
        if (!$row) {
            return $row;
        }

        return $row[$field];
    }
148697
public function hGet($key, $field) {
        return $this->getHandler($this->judge(__FUNCTION__))->hGet($key, $field);
    }
238300
function get_by($field, $value)
	{
		$q = \Fw\Db::prepare("select * from " . $this->_table . " where " . $field . "=?");
		$q->execute(array($value));
		return $q->fetchAll(\PDO::FETCH_CLASS, $this->_entity);
	}
850358
public function get(string $key, $field = null)
    {
        return null !== $field ? $this->getTable()->get($key, $field) : $this->getTable()->get($key);
    }
925963
public static function dataGet( $target, $key, $default = NULL )
    {
        if ( is_null( $key ) ) return $target;

        foreach ( explode( '.', $key ) as $segment )
        {
            if ( is_array( $target ) )
            {
                if ( !array_key_exists( $segment, $target ) )
                {
                    return static::value( $default );
                }

                $target = $target[ $segment ];
            }
            elseif ( is_object( $target ) )
            {
                if ( !isset( $target->{$segment} ) )
                {
                    return static::value( $default );
                }

                $target = $target->{$segment};
            }
            else
            {
                return static::value( $default );
            }
        }

        return $target;
    }
1279237
public function getFieldValue($object, $field)
    {
        $this->assertObjectInstance($object);

        return $this->getField($field)->get($object);
    }
772338
public function hGet($key, $field)
    {
        $this->log(__FUNCTION__, $key);
        return $this->persistence->hGet($key, $field);
    }
994986
public function fetchByField($field, $value, $limit = null, $order = null, $offset = null, &$count = false)
    {
        $fetch = $this->getBaseFetch()
            ->where()
            ->equal($field, ':' . $field);
        $parameters = array(':' . $field => $value);
        return $this->fetch($fetch, $parameters, $limit, $order, $offset, $count);
    }
899535
public function get($field)
    {
        if (!is_null($this->filtered) && ! is_null($this->filtered[0])) {
            return isset($this->filtered[0][0][$field]) ? $this->filtered[0][0][$field] : null;
        }

        // Todo: Get values of entities
    }
529638
public function getFieldValue(object $document, string $field)
    {
        if ($document instanceof GhostObjectInterface && $field !== $this->identifier && ! $document->isProxyInitialized()) {
            $document->initializeProxy();
        }

        return $this->reflFields[$field]->getValue($document);
    }
1202997
public static function from($target)
    {
        return collect((new ReflectionClass($target))->getProperties())
            ->mapWithKeys(function ($property) use ($target) {
                $property->setAccessible(true);

                if (($value = $property->getValue($target)) instanceof Model) {
                    return [$property->getName() => FormatModel::given($value)];
                } elseif (is_object($value)) {
                    return [
                        $property->getName() => [
                            'class' => get_class($value),
                            'properties' => json_decode(json_encode($value), true),
                        ],
                    ];
                } else {
                    return [$property->getName() => json_decode(json_encode($value), true)];
                }
            })->toArray();
    }
1142127
protected function get($field)
    {
        $map = $this->_config['fieldMap'];
        if (isset($map[$field])) {
            $field = $map[$field];
        }

        if (isset($this->data[$field])) {
            return $this->data[$field];
        }

        return null;
    }
1216184
public function getPropertyValue($entity, $field, $default = null)
    {
        $this->assertEntity($entity);

        if (is_array($entity) || $entity instanceof \ArrayAccess) {
            return isset($entity[$field]) ? $entity[$field] : $default;
        }

        $ref = $this->getReflection($entity);
        if (!$ref->hasProperty($field)) {
            return isset($entity->{$field}) ? $entity->{$field} : $default;
        }

        return $this->getProperty($ref, $field)->getValue($entity);
    }
841844
protected function getLoaderData($field)
    {
        $loaderName = $this->loadersMap->getLoaderForField($field);
        if (!isset($this->loadersResults[ $loaderName ])) {
            $this->loadersResults[ $loaderName ] = $this->{sprintf('%sLoader', $loaderName)}();
        }

        return $this->loadersResults[ $loaderName ];
    }