vendor/topthink/think-helper/srchelper.php

Functions

class_basename()

class_basename(string|object  $class) : string

获取类名(不包含命名空间)

Parameters

string|object $class

Returns

string

class_uses_recursive()

class_uses_recursive(  $class) : array

获取一个类里所有用到的trait,包括父类的

Parameters

$class

Returns

array

trait_uses_recursive()

trait_uses_recursive(string  $trait) : array

获取一个trait里所有引用到的trait

Parameters

string $trait

Returns

array

classnames()

classnames() 

css样式名生成器 classnames("foo", "bar"); // => "foo bar" classnames("foo", [ "bar"=> true ]); // => "foo bar" classnames([ "foo-bar"=> true ]); // => "foo-bar" classnames([ "foo-bar"=> false ]); // => " classnames([ "foo" => true ], [ "bar"=> true ]); // => "foo bar" classnames([ "foo" => true, "bar"=> true ]); // => "foo bar" classnames("foo", [ "bar"=> true, "duck"=> false ], "baz", [ "quux"=> true ]); // => "foo bar baz quux" classnames(null, false, "bar", 0, 1, [ "baz"=> null ]); // => "bar 1"