Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

DevNull-IR/facades

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facade for pure php

use

one step:

include __DIR__ . "/vendor/autoload.php";

step two:

Create Your dynamic Class

step three: Create static Facade Class for example:

<?php

namespace Facades;

class TestFacade extends Facade
{
    /**
     * @return string
     */
    public static function setNameSpace(): string
    {
        return Test::class; // TODO: Change the autogenerated stub
    }
}

and show dependency:

add methods in comments in top class:

<?php

namespace Facades;


/**
 * Method for Test Class
 *
 * @method static string string()
 * @method static string abs()
 */
class TestFacade extends Facade
{
    /**
     * @return string
     */
    public static function setNameSpace(): string
    {
        return Test::class; // TODO: Change the autogenerated stub
    }
}

facade for dynamic class extend as Facades\Facade