src/Helpers/Token.php
protected function getObjectProperty($variable, $property, array $args)
    {
        $value = null;
        $method1 = $property;
        $method2 = 'get' . ucfirst($property);
        $method3 = 'get_' . $property;
        if (method_exists($variable, $method1)) {
            $value = call_user_func_array(array($variable, $method1), $args);
        } elseif (method_exists($variable, $method2)) {
            $value = call_user_func_array(array($variable, $method2), $args);
        } elseif (method_exists($variable, $method3)) {
            $value = call_user_func_array(array($variable, $method3), $args);
        } elseif (method_exists($variable, '__get')) {
            @$value = $variable->$property;
        } elseif (method_exists($variable, '__call')) {
            try {
                $value = @call_user_func_array(array($variable, $property), $args);
            } catch (Exception $e) {
            }
            if ($value === null || $value === '') {
                try {
                    $value = call_user_func_array(array($variable, $method1), $args);
                } catch (Exception $e) {
                }
            }
            if ($value === null || $value === '') {
                try {
                    $value = call_user_func_array(array($variable, $method2), $args);
                } catch (Exception $e) {
                }
            }
            if ($value === null || $value === '') {
                try {
                    $value = call_user_func_array(array($variable, $method3), $args);
                } catch (Exception $e) {
                }
            }
        }
        return $value;
    }
protected function getObjectProperty($variable, $property, array $args)
    {
        $value = null;
        $method1 = $property;
        $method2 = 'get' . ucfirst($property);
        $method3 = 'get_' . $property;
        if (method_exists($variable, $method1)) {
            $value = call_user_func_array(array($variable, $method1), $args);
        } elseif (method_exists($variable, $method2)) {
            $value = call_user_func_array(array($variable, $method2), $args);
        } elseif (method_exists($variable, $method3)) {
            $value = call_user_func_array(array($variable, $method3), $args);
        } elseif (method_exists($variable, '__get')) {
            @$value = $variable->$property;
        } elseif (method_exists($variable, '__call')) {
            try {
                $value = @call_user_func_array(array($variable, $property), $args);
            } catch (Exception $e) {
            }
            if ($value === null || $value === '') {
                try {
                    $value = call_user_func_array(array($variable, $method1), $args);
                } catch (Exception $e) {
                }
            }
            if ($value === null || $value === '') {
                try {
                    $value = call_user_func_array(array($variable, $method2), $args);
                } catch (Exception $e) {
                }
            }
            if ($value === null || $value === '') {
                try {
                    $value = call_user_func_array(array($variable, $method3), $args);
                } catch (Exception $e) {
                }
            }
        }
        return $value;
    }
protected function getObjectProperty ( $ variable , $ property , array $ args ) { $ value = null ; $ method1 = $ property ; $ method2 = 'get' . ucfirst ( $ property ) ; $ method3 = 'get_' . $ property ; if ( method_exists ( $ variable , $ method1 ) ) { $ value = call_user_func_array ( array ( $ variable , $ method1 ) , $ args ) ; } elseif ( method_exists ( $ variable , $ method2 ) ) { $ value = call_user_func_array ( array ( $ variable , $ method2 ) , $ args ) ; } elseif ( method_exists ( $ variable , $ method3 ) ) { $ value = call_user_func_array ( array ( $ variable , $ method3 ) , $ args ) ; } elseif ( method_exists ( $ variable , '__get' ) ) { @ $ value = $ variable -> $ property ; } elseif ( method_exists ( $ variable , '__call' ) ) { try { $ value = @ call_user_func_array ( array ( $ variable , $ property ) , $ args ) ; } catch ( Exception $ e ) { } if ( $ value === null || $ value === '' ) { try { $ value = call_user_func_array ( array ( $ variable , $ method1 ) , $ args ) ; } catch ( Exception $ e ) { } } if ( $ value === null || $ value === '' ) { try { $ value = call_user_func_array ( array ( $ variable , $ method2 ) , $ args ) ; } catch ( Exception $ e ) { } } if ( $ value === null || $ value === '' ) { try { $ value = call_user_func_array ( array ( $ variable , $ method3 ) , $ args ) ; } catch ( Exception $ e ) { } } } return $ value ; }
Looks up a property in a web shop specific object.

This part is extracted into a separate method so it can be overridden
with webshop specific ways to access properties. The base implementation
will probably get the property anyway, so override mainly to prevent
notices or warnings.

@param object $variable
The variable to search for the property.
@param string $property
The property or function to get its value.
@param array $args
Optional arguments to pass if it is a function.

@return null|string
The value for the property of the given name, or null or the empty
string if not available (or the property really equals null or the
empty string). The return value may be a scalar (numeric type) that can
be converted to a string.
Looks up a property in a web shop specific object .