Skip to content

Is it possible to set a custom filename and path? #312

Answered by richmilns
richmilns asked this question in Q&A
Discussion options

You must be logged in to vote

So based on the above suggestion of customising the DefaultFactoryOrigin class, I got it working like so:

Example of helper class to send data from Phalcon

<?php

declare(strict_types=1);

namespace Core\View\Helper;

use Core\View\Helper\Ray\Origin\VoltOriginFactory;
use Exception;
use Spatie\Ray\Ray as SpatieRay;
use Spatie\Ray\Settings\SettingsFactory;
use Spatie\Ray\Payloads\Payload;

/**
 * Wrapper class for Spatie\Ray debugging app to be compatible with Volt.
 * `ray()` returns an instance of itself to allow for chaining, but this mean that Volt threw an exception
 * Composer requirement: spatie/ray
 * @package Core\Helper
 * @example PHP: (new Core\View\Helper\Ray())->send('test', …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@richmilns
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by freekmurze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants