@param $identifier
@param $className

@return $this
10939
public function bindClassToRule ($className, $identifier)
		{
			if (! isset($this->rules[$identifier])) {
				throw new Dependency('Class ' . $className . ' set into invalid rule ' . $identifier);
			}

			$this->classIndex->setClassToRule($identifier, $className);

			return $this;
		}
1242668
protected function getInsertObjectIdentitySql($identifier, $classId, $entriesInheriting)
    {
        $query = <<<QUERY
              INSERT INTO %s (class_id, object_identifier, entries_inheriting)
              VALUES (%d, %s, %s)
QUERY;

        return sprintf(
            $query,
            $this->options['oid_table_name'],
            $classId,
            $this->connection->quote($identifier),
            $this->connection->getDatabasePlatform()->convertBooleans($entriesInheriting)
        );
    }
1049377
public function getProxy($className, $identifier)
    {
        $proxyClassName = str_replace('\\', '', $className) . 'Proxy';
        $fqn = $this->proxyNamespace . '\\' . $proxyClassName;

        if (! class_exists($fqn, false)) {
            $fileName = $this->proxyDir . DIRECTORY_SEPARATOR . $proxyClassName . '.php';
            if ($this->autoGenerate) {
                $this->generateProxyClass($this->xem->getClassMetadata($className), $proxyClassName, $fileName, self::$proxyClassTemplate);
            }
            require $fileName;
        }

        if ( ! $this->xem->getMetadataFactory()->hasMetadataFor($fqn)) {
            $this->xem->getMetadataFactory()->setMetadataFor($fqn, $this->xem->getClassMetadata($className));
        }

        $documentPersister = $this->xem->getUnitOfWork()->getXmlEntityPersister($className);

        return new $fqn($documentPersister, $identifier);
    }
1323233
public static function driverClass($identifier) {
		if (!isset(self::$registry[$identifier])) {
			return null;
		}

		return self::$registry[$identifier];
	}
661814
public function populateIdentifier(DataObject $object, $identifier)
    {
        if ($field = $this->getDefaultIdentifier()) {
            
            return $object->setField($field, $identifier);
            
        } else {
            
            if ($this->getSchema()->fieldSpec($object, 'Title')) {
                return $object->setField('Title', $this->getIdentifierAsTitle($identifier));
            }
            
            if ($this->getSchema()->fieldSpec($object, 'Name')) {
                return $object->setField('Name', $this->getIdentifierAsTitle($identifier));
            }
            
        }
        
        return $object;
    }
973895
public function set($identifier, $value)
    {
        $this->internalSet($this->configsContainer, $identifier, $value);

        return $this;
    }
776427
public static function setAlias($alias, $identifier)
    {
        $identifier = self::getIdentifier($identifier);
        self::$_aliases[$alias] = $identifier;
    }
813589
public function getClient($identifier)
    {
        $client = $this->getClientFromPool($identifier);

        if ($client === null) {
            $client = $this->createClient($identifier);
            $this->getSession()->registerClient($client);
        }

        return $client;
    }
182882
public static function setConfig($identifier, array $config)
    {
        $objIdentifier = self::getIdentifier($identifier);
        $strIdentifier = (string) $objIdentifier;

        if (isset(self::$_configs[$strIdentifier])) {
            self::$_configs[$strIdentifier] = self::$_configs[$strIdentifier]->append($config);
        } else {
            self::$_configs[$strIdentifier] = new AnConfig($config);
        }
    }
458496
private function inflateType($identifier, $type = Scope::class)
    {
        if ($identifier === null) {
            return null;
        }

        return $this->entityManager->find($type, $identifier);
    }
1286084
protected function createClient($identifier)
    {
        try {
            $reflection = new \ReflectionClass($identifier);
            if (!$reflection->isSubclassOf('\PommProject\ModelManager\ModelLayer\ModelLayer')) {
                throw new ModelLayerException(sprintf("Class '%s' is not a subclass of ModelLayer.", $identifier));
            }
        } catch (\ReflectionException $e) {
            throw new ModelLayerException(sprintf("Error while loading class '%s' (%s).", $identifier, $e->getMessage()));
        }

        return new $identifier();
    }
883330
public function addMapping(string $className, string $identifier): Mapper
    {
        if (class_exists($className) === false) {
            throw new ClassNotExists($className);
        }

        $this->mapping[$identifier] = $className;

        return $this;
    }
871237
public function addIdentifier($identifier)
    {
        $identifiers = $this->getIdentifiers();
        array_push($identifiers, $identifier);
        $this->setIdentifiers($identifiers);
    }
430251
public function findClass(AnServiceIdentifier $identifier)
    {
        $classname = 'An'.ucfirst($identifier->package).AnInflector::implode($identifier->path).ucfirst($identifier->name);

        if (!class_exists($classname)) {
            $classname = AnServiceClass::findDefaultClass($identifier);

            if (!$classname) {
                // use default class instead
                $classname = 'An'.ucfirst($identifier->package).AnInflector::implode($identifier->path).'Default';

                if (!class_exists($classname)) {
                    $classname = false;
                }
            }
        }

        return $classname;
    }
795207
public function buildForm($identifier = null)
	{
		$this->setFormMapper(new FormMapper);
		$this->configureForm($this->getFormMapper());

		$this->setFormBuilder(new FormBuilder($this->getFormMapper()));
		$this->getFormBuilder()
			->setModel($this->getModel())
			->setIdentifier($identifier)
			->setContext($identifier === null ? FormBuilder::CONTEXT_CREATE : FormBuilder::CONTEXT_EDIT)
			->build();

		return $this;
	}
562695
public function getId($class, $identifier)
    {
        if (isset($this->fixtures[$class][$identifier])) {
            return $this->fixtures[$class][$identifier];
        } else {
            return false;
        }
    }
576685
public function findByIdentifier($identifier) {
		$accessTokenResult = $this->cache->get($identifier);
		if ($accessTokenResult instanceof AccessToken) {
			return $accessTokenResult;
		}
		return NULL;
	}