private function findValue(string $name)
    {
        $source = $this->source;

        $path = explode('.', $name);
        foreach ($path as $step) {
            if ($source instanceof EntityInterface) {
                if (!$source->hasField($step)) {
                    return null;
                }

                //Sub entity or field
                $source = $source->getField($step);
                continue;
            }

            if ($source instanceof AccessorInterface) {
                $source = $source->packValue();
                continue;
            }

            if (is_array($source) && array_key_exists($step, $source)) {
                $source = &$source[$step];
                continue;
            }

            //Unable to resolve value, an exception required here
            return null;
        }

        return $source;
    }
private function findValue(string $name)
    {
        $source = $this->source;

        $path = explode('.', $name);
        foreach ($path as $step) {
            if ($source instanceof EntityInterface) {
                if (!$source->hasField($step)) {
                    return null;
                }

                //Sub entity or field
                $source = $source->getField($step);
                continue;
            }

            if ($source instanceof AccessorInterface) {
                $source = $source->packValue();
                continue;
            }

            if (is_array($source) && array_key_exists($step, $source)) {
                $source = &$source[$step];
                continue;
            }

            //Unable to resolve value, an exception required here
            return null;
        }

        return $source;
    }
private function findValue ( string $ name ) { $ source = $ this -> source ; $ path = explode ( '.' , $ name ) ; foreach ( $ path as $ step ) { if ( $ source instanceof EntityInterface ) { if ( ! $ source -> hasField ( $ step ) ) { return null ; } //Sub entity or field $ source = $ source -> getField ( $ step ) ; continue ; } if ( $ source instanceof AccessorInterface ) { $ source = $ source -> packValue ( ) ; continue ; } if ( is_array ( $ source ) && array_key_exists ( $ step , $ source ) ) { $ source = & $ source [ $ step ] ; continue ; } //Unable to resolve value, an exception required here return null ; } return $ source ; }
Find field value using dot notation.

@param string $name

@return mixed|null
Find field value using dot notation .