ResultPrinter::printConsoleObject PHP 메소드

printConsoleObject() 보호된 정적인 메소드

protected static printConsoleObject ( $object, $error = null )
    protected static function printConsoleObject($object, $error = null)
    {
        if ($error) {
            echo 'ERROR:' . $error;
        }
        if ($object) {
            if (is_a($object, 'PayPal\\Common\\PayPalModel')) {
                /** @var $object \PayPal\Common\PayPalModel */
                echo $object->toJSON(128);
            } elseif (is_string($object) && \PayPal\Validation\JsonValidator::validate($object, true)) {
                echo str_replace('\\/', '/', json_encode(json_decode($object), 128));
            } elseif (is_string($object)) {
                echo $object;
            } else {
                print_r($object);
            }
        } else {
            echo "No Data";
        }
    }