src/Components/Schema.php
public function doesResourceExist($type, $name, $returnName = false)
    {
        if (empty($name)) {
            throw new \InvalidArgumentException('Resource name cannot be empty.');
        }

        //  Build the lower-cased resource array
        $names = $this->getResourceNames($type);

        //	Search normal, return real name
        $ndx = strtolower($name);
        if (false !== array_key_exists($ndx, $names)) {
            return $returnName ? $names[$ndx]->name : true;
        }

        return false;
    }
public function doesResourceExist($type, $name, $returnName = false)
    {
        if (empty($name)) {
            throw new \InvalidArgumentException('Resource name cannot be empty.');
        }

        //  Build the lower-cased resource array
        $names = $this->getResourceNames($type);

        //	Search normal, return real name
        $ndx = strtolower($name);
        if (false !== array_key_exists($ndx, $names)) {
            return $returnName ? $names[$ndx]->name : true;
        }

        return false;
    }
@param string $type Resource type
@param string $name
@param bool   $returnName

@return mixed
@throws \Exception