将 class name 转换为 id

@param string $id

@return string
193218
protected function getAbstractId($id)
    {
        if (isset($this->aliases[$id])) {
            $id = $this->aliases[$id];
        }

        return $id;
    }
1301347
protected function getReflectionById($id) {
		if (! isset($this->classReflections[$id])) {
			$this->classReflections[$id] = $this->initReflection($id);
		}
		
		return $this->classReflections[$id];
	}
544725
public function forForeignID($id)
    {
        $singleton = DataObject::singleton($this->baseClass);
        /** @var Relation $relation */
        $relation = $singleton->{$this->relationName}($id);
        return $relation;
    }
408939
public function image($id, $class = '')
    {
        $img = '';

        if ($image = app('Grafite\Cms\Models\Image')->find($id)) {
            $img = $image->url;
        }

        return '<img class="'.$class.'" src="'.$img.'">';
    }
103950
public function read($id)
    {
        $return = '';

        $rows = call_user_func_array(array(&$this, 'find'), $this->_getPrimary($id));

        if (count($rows)) {
            if ($this->_getExpirationTime($row = $rows->current()) > time()) {
                $return = $row->{$this->_dataColumn};
            } else {
                $this->destroy($id);
            }
        }

        return $return;
    }
222269
public function getClass($id)
    {
        return isset($this->classes[$id]) ? $this->classes[$id] : null;
    }
901397
public function get($id)
    {
        if (!$this->has($id)) {
            $errMsg = sprintf('Failed to get the name of the class nature of the interface %s', $id);
            throw new Exception\ErrorBuildEntityClassNameException($errMsg);
        }

        return $this->entityClassNameCache[$id];
    }
43655
public function get( $id ) {
		if ( isset( $this->types[ $id ] ) ) {
			return $this->types[ $id ];
		}

		return null;
	}
991202
public static function classIdentifierByID( $id )
    {
        $identifierHash = array_flip( self::classIdentifiersHash() );

        if ( isset( $identifierHash[$id] ) )
            return $identifierHash[$id];
        else
            return false;
    }
537096
public function getComponent($id)
    {
        if (isset($this->_components[$id])) {
            return $this->_components[$id];
        }
        if (!isset($this->_componentConfig[$id])) {
            return null;
        }
        $config = $this->_componentConfig[$id];
        if (!isset($config['class'])) {
            throw new Exception('应用组件必须设置"class"');
        }
        $className = $config['class'];
        unset($config['class']);
        /* @var Component $className */
        return $this->_components[$id] = $className::getInstance($config);
    }
67468
public static function cleanId($id)
    {
        // Remove non allowed characters
        $id = preg_replace('/[^A-Za-z0-9\-\_\/~]/', '', $id);

        // Replace multiple slashes
        $id = preg_replace('/\/+/', '/', $id);

        return trim($id, '/');
    }
30810
protected function _id($id)
    {
        if (($id !== null) && isset($this->_options['cache_id_prefix'])) {
            return $this->_options['cache_id_prefix'] . $id; // return with prefix
        }
        return $id; // no prefix, just return the $id passed
    }
557996
public static function getInstance($id = 'default')
    {
        if (!isset(static::$instances[$id])) {
            static::$instances[$id] = new self();
        }
        
        return static::$instances[$id];
    }
1218140
public static function classAttributeIdentifierByID( $id )
    {
        $identifierHash = array_flip( self::classAttributeIdentifiersHash() );

        if ( isset( $identifierHash[$id] ) )
        {
            $classAndClassAttributeIdentifier = explode( '/', $identifierHash[$id] );
            return $classAndClassAttributeIdentifier[1];
        }
        else
            return false;
    }
896204
public function getState($id)
	{
		if ($id === null) {
			return '';
		} else {
			return isset($this->properties_storage[$id]['state'])
				? $this->properties_storage[$id]['state']
				: '';
		}
	}
1233601
public function filename($id)
    {
        if (isset($this->filenameCache[$id])) {
            return $this->filenameCache[$id];
        }

        $dir = $this->dir;
        $filename = $id;

        if ($this->subDirs) {
            $parts = explode(CacheCache\Cache::$namespaceSeparator, $id);
            $filename = array_pop($parts);
            $dir .= DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $parts);
            if (!file_exists($dir)) {
                mkdir($dir, 0777, true);
            }
        }

        if (!$this->idAsFilename) {
            $filename = md5($filename);
        }

        if (!empty($this->fileExtension)) {
            $filename .= $this->fileExtension;
        }

        $filename = $dir . DIRECTORY_SEPARATOR . $filename;
        $this->filenameCache[$id] = $filename;
        return $filename;
    }
1042936
protected function getPluginClass($id)
    {
        return isset($this->pluginClasses[$id]) ? $this->pluginClasses[$id] : null;
    }