src/Core/Injector/Injector.php
public function convertServiceProperty($value)
    {
        if (is_array($value)) {
            $newVal = array();
            foreach ($value as $k => $v) {
                $newVal[$k] = $this->convertServiceProperty($v);
            }
            return $newVal;
        }

        // Evaluate service references
        if (is_string($value) && strpos($value, '%$') === 0) {
            $id = substr($value, 2);
            return $this->get($id);
        }

        // Evaluate constants surrounded by back ticks
        if (preg_match('/^`(?<name>[^`]+)`$/', $value, $matches)) {
            $envValue = Environment::getEnv($matches['name']);
            if ($envValue !== false) {
                $value = $envValue;
            } elseif (defined($matches['name'])) {
                $value = constant($matches['name']);
            } else {
                $value = null;
            }
        }

        return $value;
    }
public function convertServiceProperty($value)
    {
        if (is_array($value)) {
            $newVal = array();
            foreach ($value as $k => $v) {
                $newVal[$k] = $this->convertServiceProperty($v);
            }
            return $newVal;
        }

        // Evaluate service references
        if (is_string($value) && strpos($value, '%$') === 0) {
            $id = substr($value, 2);
            return $this->get($id);
        }

        // Evaluate constants surrounded by back ticks
        if (preg_match('/^`(?<name>[^`]+)`$/', $value, $matches)) {
            $envValue = Environment::getEnv($matches['name']);
            if ($envValue !== false) {
                $value = $envValue;
            } elseif (defined($matches['name'])) {
                $value = constant($matches['name']);
            } else {
                $value = null;
            }
        }

        return $value;
    }
public function convertServiceProperty ( $ value ) { if ( is_array ( $ value ) ) { $ newVal = array ( ) ; foreach ( $ value as $ k => $ v ) { $ newVal [ $ k ] = $ this -> convertServiceProperty ( $ v ) ; } return $ newVal ; } // Evaluate service references if ( is_string ( $ value ) && strpos ( $ value , '%$' ) === 0 ) { $ id = substr ( $ value , 2 ) ; return $ this -> get ( $ id ) ; } // Evaluate constants surrounded by back ticks if ( preg_match ( '/^`(?<name>[^`]+)`$/' , $ value , $ matches ) ) { $ envValue = Environment :: getEnv ( $ matches [ 'name' ] ) ; if ( $ envValue !== false ) { $ value = $ envValue ; } elseif ( defined ( $ matches [ 'name' ] ) ) { $ value = constant ( $ matches [ 'name' ] ) ; } else { $ value = null ; } } return $ value ; }
Recursively convert a value into its proper representation with service references
resolved to actual objects

@param string $value
@return array|mixed|string
Recursively convert a value into its proper representation with service references resolved to actual objects