@param string $pkgHandle

@return static|null
970473
public static function getClass($pkgHandle)
    {
        if (is_dir(DIR_STARTING_POINT_PACKAGES . '/' . $pkgHandle)) {
            $class = '\\Application\\StartingPointPackage\\' . camelcase($pkgHandle) . '\\Controller';
        } else {
            $class = '\\Concrete\\StartingPointPackage\\' . camelcase($pkgHandle) . '\\Controller';
        }
        if (class_exists($class, true)) {
            $cl = Core::build($class);
        } else {
            $cl = null;
        }

        return $cl;
    }
670382
public function delete ($pkValue = FALSE)
	{
		
		// If there is no key value passed set it
		
		if ($pkValue === FALSE)
		{
			$pkValue	= $this->iget (static::$pk);
		}
		
		// Call parent method
		
		$parent	= parent::delete ($pkValue);
		
		if ($parent === FALSE)
		{
			return FALSE;
		}
		
		// If there is a memcached object delete from the cache

		if ($this->memcached instanceof \Memcached)
		{
			$this->memcached->delete (static::_getMemcachedID ($pkValue));
		}
		
		// Return
		
		return $parent;
		
	}
104012
public function checkSession( & $nCheckReturn = null )
	{
		//      ...
		$nRet	= UCProError::UCLIENTPRO_CHECKSESSION_FAILURE;

		//	...
		$objParam	= new \stdClass();
		$objParam->{ UCProConst::CKX_MID }	= $this->getMId();
		$objParam->{ UCProConst::CKT_SS_ID }	= $this->getSessionId();
		$objParam->{ UCProConst::CKT_SS_URL }	= $this->getSessionUrl();
		$objParam->{ 'cookie_array' }		= $this->getCookieArray();

		$nCheckReturn	= null;
		$nCallCheck	= $this->m_cProSession->checkSessionByRPC( $objParam, $nCheckReturn );
		if ( UCProError::SUCCESS == $nCallCheck )
		{
			if ( CConst::ERROR_SUCCESS == $nCheckReturn )
			{
				$nRet	= UCProError::SUCCESS;
			}
			else
			{
				$nRet	= UCProError::UCLIENTPRO_CHECKSESSION_INVALID_RETURN;
			}
		}
		else
		{
			$nRet	= $nCallCheck;
		}

		return $nRet;
	}
1114933
public function getStaticMethodCache()
    {
        if (!$this->staticMethodCache) {
            $this->staticMethodCache = new StaticMethodCache($this->gatherer);
        }

        return $this->staticMethodCache;
    }
25378
public static function getByID($pkgID)
    {
        $app = ApplicationFacade::getFacadeApplication();

        return $app->make(PackageService::class)->getByID($pkgID);
    }
541959
public function hashCode()
    {
        $validPk = null !== $this->getPartId() &&
            null !== $this->getCompositeId();

        $validPrimaryKeyFKs = 2;
        $primaryKeyFKs = [];

        //relation skill_part_fk_part to table kk_trixionary_skill
        if ($this->aSkillRelatedByPartId && $hash = spl_object_hash($this->aSkillRelatedByPartId)) {
            $primaryKeyFKs[] = $hash;
        } else {
            $validPrimaryKeyFKs = false;
        }

        //relation skill_part_fk_composite to table kk_trixionary_skill
        if ($this->aSkillRelatedByCompositeId && $hash = spl_object_hash($this->aSkillRelatedByCompositeId)) {
            $primaryKeyFKs[] = $hash;
        } else {
            $validPrimaryKeyFKs = false;
        }

        if ($validPk) {
            return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));
        } elseif ($validPrimaryKeyFKs) {
            return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));
        }

        return spl_object_hash($this);
    }
722950
public static function getByHandle($pkHandle)
    {
        $keys = null;
        $app = Application::getFacadeApplication();
        $cache = $app->make('cache/request');
        if ($cache->isEnabled()) {
            $item = $cache->getItem('permission_keys');
            if (!$item->isMiss()) {
                $keys = $item->get();
            }
        }
        if ($keys === null) {
            $keys = self::loadAll();
        }

        return isset($keys[$pkHandle]) ? $keys[$pkHandle] : null;
    }
936108
public function wherePk($pkData,$table = null,$tableAlias = null)
	{
		if(null === $table)
		{
			$table = $this->tableName();
		}
		if(null === $tableAlias)
		{
			$tableAlias = $table;
		}
		if(empty($this->fields) || $table !== $this->tableName())
		{
			$this->loadFields($fields, $fieldNames, $pk, $bitFields, $table);
		}
		else
		{
			$pk = $this->pk;
		}
		if(is_array($pk))
		{
			$where = array();
			$tWhere = &$where;
			foreach($pk as $pkName)
			{
				if(isset($pkData[$pkName]))
				{
					$tWhere['and'] = array((false === $tableAlias ? '' : ($tableAlias . '.')) . $pkName => $pkData[$pkName]);
					$tWhere = &$tWhere['and'];
				}
			}
		}
		else
		{
			$where = array((false === $tableAlias ? '' : ($tableAlias . '.')) . $pk=>is_array($pkData) ? $pkData[$pk] : $pkData);
		}
		return $this->where($where);
	}
639893
public function remove($pk = null) {
        if (null === $pk) {
            $pk = $this->model->pk;
        }
        $this->model->builder
            ->delete()
            ->from($this->model->tableName)
            ->where("`{$this->model->pkName}`=:pk", array(':pk' => $pk,))
            ->query();
        return $this->model->db->getAffectedRows();
    }
1132091
public function getPackageHandle()
    {
        $pkgID = $this->getPackageID();

        return $pkgID ? PackageList::getHandle($this->pkgID) : null;
    }
680360
public static function get($pKey)
    {
        if (array_key_exists($pKey, self::$_registry)) {
            return self::$_registry[$pKey];
        }

        return NULL;
    }
265659
public function getPk($table, $tablePrefix = null)
    {
        $rows = $this->getDbFields($table, $tablePrefix);
        foreach ($rows as $val) {
            if ($val['primary']) {
                return $val['name'];
            }
        }
        return false;
    }
837192
public static function load($pk){
    $table = static::persistenceOptions('table');
    $cb    = static::persistenceLoad();
    $op    = static::persistenceOptions();

    // Use standard persistence on DB layer
    return ( false == is_callable($cb) ) ?
      static::persistenceLoadDefault($pk,$table,$op) : $cb($pk,$table,$op);
  }
353165
public function getClass($pkgHandle)
    {
        $cache = $this->application->make('cache/request');
        $item = $cache->getItem('package/class/' . $pkgHandle);
        $cl = $item->get();
        if ($item->isMiss()) {
            $item->lock();
            // loads and instantiates the object

            $cl = \Concrete\Core\Foundation\ClassLoader::getInstance();
            $cl->registerPackageController($pkgHandle);

            $class = '\\Concrete\\Package\\' . camelcase($pkgHandle) . '\\Controller';
            try {
                $cl = $this->application->make($class);
            } catch (\Exception $ex) {
                $cl = $this->application->make('Concrete\Core\Package\BrokenPackage', [$pkgHandle]);
            }
            $cache->save($item->set($cl));
        }

        return clone $cl;
    }
138332
public function findModelInstanceByPk(string $table, $pk, array $options = [])
    {
        /* @var Model $adapter */
        if (!($modelClass = $this->framework->getAdapter(Model::class)->getClassFromTable($table))) {
            return null;
        }

        if (null === ($adapter = $this->framework->getAdapter($modelClass))) {
            return null;
        }

        return $adapter->findByPk($pk, $options);
    }
1243691
static function instance(array $whitelist, array $blacklist, array $aliaslist, $main_entity_id = \hlin\Auth::Unidentified, $main_entity_role = \hlin\Auth::Guest, \hlin\archetype\Logger $logger = null) {

		$i = new static;

		$i->whitelist = $whitelist;
		$i->blacklist = $blacklist;
		$i->aliaslist = $aliaslist;

		$i->id = $main_entity_id;
		$i->role = $main_entity_role;

		$i->logger = $logger;

		return $i;
	}
1354064
public static function get($pk)
    {
        if (empty(self::pkField())) {
            return false;
        }
        $sql = 'SELECT ' . join(',', self::fields()) . ' FROM `' . self::table() . '` WHERE `' . self::pkField() . '`=?;';
        $result = BLSql::exec($sql, [$pk]);
        $data = $result->fetch(\PDO::FETCH_ASSOC);
        if ($data === false) {
            return false;
        }
        return new static($data, true);
    }