Returns an entry for a guid or false
@param string $guid
@return array|false
329822
private function &getEntryForGuid( $guid )
	{
		if ( ! isset( $this->uniqueFactIds[ $guid ] ) )
		{
			return false;
		}

		// Get the element
		$facts = $this->getElement( $this->uniqueFactIds[ $guid ] );

		// And find the entry with the corresponding guid
		foreach ( $facts as $key => &$entry )
		{
			if ( $entry['guid'] == $guid ) return $entry;
		}

		return false;
	}
786764
public static function getByID($fsID)
    {
        $db = Database::connection();
        $row = $db->fetchAssoc('SELECT * FROM FileSets WHERE fsID = ?', array($fsID));
        if (is_array($row)) {
            $fs = new static();
            $fs = array_to_object($fs, $row);
            if ($row['fsType'] == static::TYPE_SAVED_SEARCH) {
                $row2 = $db->GetRow(
                    'SELECT fsSearchRequest, fsResultColumns FROM FileSetSavedSearches WHERE fsID = ?',
                    array($fsID));
                $fs->fsSearchRequest = @unserialize($row2['fsSearchRequest']);
                $fs->fsResultColumns = @unserialize($row2['fsResultColumns']);
            }

            return $fs;
        }
    }
197181
public static function get( $guid ) {
		$instance = self::get_instance();
		if ( isset( $instance->plugins[ $guid ] ) ) {
			return $instance->plugins[ $guid ];
		} else {
			new \WP_Error( sprintf( __( 'Plugin %s is not registered.', 'sekisyo' ), $guid ), 404, [
				'status' => 404,
			] );
		}
	}
120690
public function getRules($uid){
        
        $ruleIds = $this->getRuleIds($uid);
        
        $rules = DB::table($this->dbTablePrefix . $this->tableAuthRule)
                ->where('id' , 'in' , $ruleIds)
                ->where('status' , '1')
                ->order('sort asc')
                ->select();
        
        return $rules;
    }
915178
public static function checkGuidExists($guid)
    {
        if (is_string($guid)) {
            if (strlen($guid) == 16) {
                $binary = new Binary($guid, Binary::TYPE_UUID);
            } elseif (preg_match(Number::GUID_REGEX, $guid)) {
                $binary = new Binary(Number::guid_bin($guid), Binary::TYPE_UUID);
            } else {
                return false;
            }
            return static::findOne($binary) !== null;
        }
        if ($guid instanceof Binary) {
            return static::findOne($guid) !== null;
        }
        return false;
    }
257531
public function getAllSubordinates($guid = null, $limit = CAKE_LDAP_SYNC_AD_LIMIT) {
		$result = [];
		$conditions = [];
		$contain = [];
		if (!empty($guid)) {
			$conditions[$this->Employee->alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID] = $guid;
			$contain[] = 'Employee';
		}
		$fields = [
			$this->alias . '.id',
			$this->alias . '.parent_id',
			$this->alias . '.lft',
			$this->alias . '.rght',
			$this->alias . '.name',
		];
		$order = [
			$this->alias . '.id' => 'asc',
		];
		$result = $this->find('all', compact('fields', 'conditions', 'order', 'limit', 'contain'));

		return $result;
	}
842222
public static function GUID()
	{
		if ( function_exists( 'com_create_guid' ) === true )
		{
			return trim( com_create_guid(), '{}' );
		}

		return sprintf( '%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand( 0, 65535 ), mt_rand( 0, 65535 ), mt_rand( 0, 65535 ), mt_rand( 16384, 20479 ), mt_rand( 32768, 49151 ), mt_rand( 0, 65535 ), mt_rand( 0, 65535 ), mt_rand( 0, 65535 ) );
	}
842127
public static function getFilesBySetID($fsID)
    {
        if (intval($fsID) > 0) {
            $fileset = self::getByID($fsID);
            if ($fileset instanceof \Concrete\Core\File\Set\Set) {
                return $fileset->getFiles();
            }
        }
    }
1302070
public function findContentByUid($uid)
    {
        $results = $this->findContentsByUids(array($uid));
        if (0 < count($results)) {
            return reset($results);
        }

        return;
    }
271523
public function get_key($keyid)
    {
        $list = $this->list_keys($keyid);

        if (is_array($list)) {
            return $list[key($list)];
        }

        // error
        return $list;
    }
466395
public static function getSubType($fid)
  {
    $parts = explode(':', $fid);
    switch(count($parts))
    {
      case 5:
        return $parts[2];
      case 4:
        return $parts[1];
      default:
        throw new InvalidFidException("Invalid FID Passed '$fid'", 500);
    }
  }
200822
public function fetchProfile($guid, $options = [])
    {
        $options['guid'] = $guid;
        return $this->_request(self::FETCH_PROFILE, $options);
    }
694316
public function getGuidFromQuery() {
        if (isset($_SERVER['QUERY_STRING'])) {
            parse_str($_SERVER['QUERY_STRING'], $parsed_array);
            if (true === array_key_exists('guid', $parsed_array)) {
                return $parsed_array['guid'];
            }
        }
        return null;
    }
679313
public function getUserinfo($uid = null)
	{
		$ret = array();
		if (extension_loaded('posix')) {
			if (is_null($uid)) {
				$uid = posix_geteuid();	// get effective userid
			} elseif (is_string($uid)) {
				// username passed?
				$ret = posix_getpwnam($uid);
			}
			if (empty($ret)) {
				$ret = posix_getpwuid($uid);
			}
			$ret['group'] = posix_getgrgid($uid_info['gid']);
			unset($ret['gid']);	// is inside group array
		}
		return $ret;
	}
1145430
protected function getDirectPermissionsByUser($userGuid)
    {
        $query = (new Query)->select('b.*')
            ->from(['a' => $this->assignmentTable, 'b' => $this->itemTable])
            ->where('{{a}}.[[item_name]]={{b}}.[[name]]')
            ->andWhere(['a.user_guid' => (string) $userGuid])
            ->andWhere(['b.type' => Item::TYPE_PERMISSION]);

        $permissions = [];
        foreach ($query->all($this->db) as $row) {
            $permissions[$row['name']] = $this->populateItem($row);
        }
        return $permissions;
    }
633626
public function updatedBy($guid)
    {
        $model = $this->noInitModel;
        if (!is_string($model->updatedByAttribute)) {
            return $this;
        }
        if ($guid instanceof BaseUserModel) {
            $guid = $guid->getGUID();
        }
        return $this->andWhere([$model->updatedByAttribute => new Binary($guid, Binary::TYPE_UUID)]);
    }
97236
public function getPropertyId($configId = false)
    {
        if (!$this->propertyId || $configId) {
            /** @var AnalyticsConfigRepository $analyticsConfigRepository */
            $analyticsConfigRepository = $this->em->getRepository('KunstmaanDashboardBundle:AnalyticsConfig');
            if ($configId) {
                $this->propertyId = $analyticsConfigRepository->find($configId)->getPropertyId();
            } else {
                $this->propertyId = $analyticsConfigRepository->findFirst()->getPropertyId();
            }
        }

        return $this->propertyId;
    }