PHPHtmlParser\StaticDom::mount PHP Метод

mount() публичный статический Метод

Call this to mount the static facade. The facade allows you to use this object as a $className.
public static mount ( string $className = 'Dom', Dom $dom = null ) : boolean
$className string
$dom Dom
Результат boolean
    public static function mount($className = 'Dom', Dom $dom = null)
    {
        if (class_exists($className)) {
            return false;
        }
        class_alias(__CLASS__, $className);
        if ($dom instanceof Dom) {
            self::$dom = $dom;
        }
        return true;
    }

Usage Example

Пример #1
0
 public function testMountWithDom()
 {
     $dom = new PHPHtmlParser\Dom();
     StaticDom::unload();
     $status = StaticDom::mount('newDom', $dom);
     $this->assertTrue($status);
 }
All Usage Examples Of PHPHtmlParser\StaticDom::mount