注册存储器驱动器.

@param string $name 存储器名称.
@param string $clz  存储器类全名.

@return bool 成功返回true。
777445
public static function registerDriver($name, $clz) {
        if (is_subclass_of($clz, StorageDriver::class)) {
            self::$IMPLS[ $name ] = $clz;

            return true;
        }

        return false;
    }
85680
public function __isset($name)
    {
        $camelizeName = $this->__buildCamelizeName($name);

        $getter = 'get' . $camelizeName;
        if (method_exists($this, $getter))
        {
            return null !== $this->$getter();
        }
        else
        {
            return false;
        }
    }
1101466
public function hasAnnotation($name)
    {
        $name = str_replace('@', '', $name);
        foreach ($this as $annotation) {
            /** @var AnnotationInterface $annotation */
            if ($annotation->getName() == $name) {
                return true;
            }
        }
        return false;
    }
863307
public function __isset($name)
	{
		if (method_exists($this, 'get_' . $name) || isset($this->$name))
		{
			return true;
		}
		else
		{
			return false;
		}
	}
1099815
public function dn($name)
    {
        $info = $this->find($name);

        if (is_array($info) && array_key_exists('dn', $info)) {
            return $info['dn'];
        }

        return false;
    }
535504
public function supports($name)
    {
        // @codeCoverageIgnoreStart
        $extensions = method_exists($this->jade, 'getExtensions')
            ? $this->jade->getExtensions()
            : $this->jade->getOption('extensions');
        // @codeCoverageIgnoreEnd
        foreach ($extensions as $extension) {
            if (substr($name, -strlen($extension)) === $extension) {
                return true;
            }
        }

        return false;
    }
536766
public function __isset($name) {
        if(isset($this->tmp[$name])) {
            return true;
        }
        if (method_exists($this, '_' . $name)) {
            return true;
        }
        if (isset($this->row[$name])) { //array_key_exists($name, $this->_row)
            return true;
        }
        if(isset($this->stack[$name])){
            $this->row = &$this->stack;
            return true;
        }
        return false;
    }
1234307
protected function _createList(string $name) : bool
    {
        /**
         * @var \CsvMigrations\Model\Table\DblistsTable
         */
        $table = $this->loadModel('CsvMigrations.Dblists');

        if ($table->exists(['name' => $name])) {
            return false;
        }

        $entity = $table->newEntity(['name' => $name]);

        return (bool)$table->save($entity);
    }
1165681
public function get($name = false) {
        N('cache_read',1);
        $id = shmop_open($this->handler, 'c', 0600, 0);
        if ($id !== false) {
            $ret = unserialize(shmop_read($id, 0, shmop_size($id)));
            shmop_close($id);

            if ($name === false) {
                return $ret;
            }
            $name   =   $this->options['prefix'].$name;
            if(isset($ret[$name])) {
                $content   =  $ret[$name];
                if(C('DATA_CACHE_COMPRESS') && function_exists('gzcompress')) {
                    //启用数据压缩
                    $content   =   gzuncompress($content);
                }
                return $content;
            }else {
                return null;
            }
        }else {
            return false;
        }
    }
465662
public function isCommand($name) {
        if (!$this->docoptResult)
            return false;

        if (!($len=strlen($name)) || !isset($this->docoptResult[$name]))
            return false;
        return (bool) preg_match('/^[a-z]+$/', $name);
    }
675587
public function hasField($name)
    {
        $result = false;
        foreach ($this->fields as $key => $fields) {
            if (isset($fields[$name])) {
                $result = true;
                break;
            }
        }
        return $result;
    }
1223459
public function index($name){
		$len = sizeof($this->rules);
		for ($i=0; $i < $len; $i++) { 
			if ($this->rules[$i]["name"]==$name)
				return $i;
		}
		return false;
	}
682636
public function isValid($name)
    {
        if (parent::isValid($name)) {
            return true;
        }
        if (is_array($name)) {
            list($cls, $method) = $name;
            if (is_object($cls)) {
                return false; // No need to convert
            }
            if (is_array($method)) {
                return true; // Need to convert
            }
        } elseif (is_string($name) && strpos($name, '::') > 0) {
            list($cls, $method) = explode('::', $name);
        } else {
            return false; // Can't handle this, maybe already callable
        }

        /** @deprecated Deprecated since 3.3, to be removed in 4.0. */
        if (isset($this->classmap[$cls])) {
            return true; // Will use service definition
        }
        if (!class_exists($cls) || !method_exists($cls, $method)) {
            return false; // Can't handle this
        }
        $refMethod = new \ReflectionMethod($cls, $method);
        if ($refMethod->isStatic()) {
            return false; // Already valid
        }
        $constructor = $refMethod->getDeclaringClass()->getConstructor();
        // We can create the class if no constructor params, else can't handle it
        return $constructor === null || $constructor->getNumberOfRequiredParameters() === 0;
    }
903237
public static function isValidName($name, $strict = false)
    {
        $constants = self::getEnum();

        if ($strict) {
            return array_key_exists($name, $constants);
        }

        $keys = array_map('strtolower', array_keys($constants));

        return in_array(strtolower($name), $keys, true);
    }
457402
public function _get($name)
    {
        $name = $this->createFileName($name);
        $file = $this->cacheDir . '/' . $name;
        $data = @file_get_contents($file);
        if (!$data) {
            return false;
        }

        $data = $this->unpackData($data);
        if (false === $data) {
            @unlink($file);

            $data = null;
        }

        return $data;
    }
1183055
public function delete($name)
  {
    $path = $this->_getPath($name);
    
    if (file_exists($path)) {
      $result = @unlink($path);
    } else {
      $result = false;
    }
    
    return $result;
  }
1044887
public function hasOption(string $name) : bool
    {
        return in_array($name, self::$options) || in_array("^$name", self::$options);
    }