Neomerx\JsonApi\Schema\RelationshipObject::__construct PHP Метод

__construct() публичный Метод

public __construct ( string $name, object | array | null | Closur\Closure $data, array $links, object | array | null | Closur\Closure $meta, boolean $isShowData, boolean $isRoot )
$name string
$data object | array | null | Closur\Closure
$links array
$meta object | array | null | Closur\Closure
$isShowData boolean
$isRoot boolean
    public function __construct($name, $data, array $links, $meta, $isShowData, $isRoot)
    {
        is_bool($isRoot) === true ?: Exceptions::throwInvalidArgument('isRoot', $isRoot);
        is_bool($isShowData) === true ?: Exceptions::throwInvalidArgument('isShowData', $isShowData);
        $isOk = $isRoot === false && is_string($name) === true || $isRoot === true && $name === null;
        $isOk ?: Exceptions::throwInvalidArgument('name', $name);
        $this->name = $name;
        $this->data = $data;
        $this->links = $links;
        $this->meta = $meta;
        $this->isShowData = $isShowData;
        $this->isRoot = $isRoot;
    }