@param bool $reset

@return array
1333
protected function getPins( $reset = false ) {
		if ( $reset ) {
			$this->_pins = [];
		}
		if ( empty( $this->_pins ) ) {
			$pins = get_transient( self::PIN );
			if ( ! is_array( $pins ) ) {
				$pins = [];
			}
			$this->_pins = $pins;
		}
		return $this->_pins;
	}
308565
public function key($reset = false)
    {
        static $key;
        $key = $reset ? false : $key;
        if (!$key) {
            $key = $this->instance->get('memcached_adapter_namespace', function ($memc, $key, &$value) {
                $value = bin2hex(openssl_random_pseudo_bytes(8));
                return true;
            });
        }
        return $key;
    }
674527
public function versions($reset = false)
    {
        if ($reset === false && $this->has('_versions')) {
            return $this->get('_versions');
        }

        /*
         * @var \Josegonzalez\Version\Model\Behavior\VersionBehavior $table
         * @var \Cake\Datasource\EntityInterface $this
         */
        $table = TableRegistry::get($this->getSource());
        $versions = $table->getVersions($this);
        $this->set('_versions', $versions);

        return $this->get('_versions');
    }
606887
public function getAll($remove = true)
    {
        $output = $this->messages;
        if (true === $remove) {
            $this->clear();
        }

        return $output;
    }
908505
public static function getList(bool $full = false)
    {
        $class = get_called_class();
        if (empty(self::$list[$class])) {
            self::$list[$class] = self::loadList();
        }
        
        $list = self::$list[$class];
        
        foreach ($list as $name => $sid) {
            if (static::isHidden($name)) {
                if (!$full)
                    unset($list[$name]);
                else
                    $list = self::updateHiddenValue($list, $name);
            }
        }

        return $list;
    }
1009794
public function getVersion($reset = false)
    {
        if ($reset || !isset($this->version)) {
            $this->version = $this->shellHelper->execute(
                [$this->getDrushExecutable(), 'version', '--format=string']
            );
        }


        return $this->version;
    }
1246420
public function getAliases($groupName, $reset = false)
    {
        if (!$reset && isset($this->aliases[$groupName])) {
            return $this->aliases[$groupName];
        }

        // Drush 9 uses 'site:alias', Drush <9 uses 'site-alias'. Fortunately
        // the alias 'sa' exists in both.
        $args = [$this->getDrushExecutable(), '@none', 'sa', '--format=json', '@' . $groupName];

        $aliases = [];

        // Run the command with a 5-second timeout. An exception will be thrown
        // if it fails.
        try {
            $result = $this->shellHelper->execute($args, null, true, true, [], 5);
            if (is_string($result)) {
                $aliases = (array) json_decode($result, true);
            }
        } catch (ProcessFailedException $e) {
            // The command will fail if the alias is not found. Throw an
            // exception for any other failures.
            if (stripos($e->getProcess()->getErrorOutput(), 'not found') === false) {
                throw $e;
            }
        }

        $this->aliases[$groupName] = $aliases;

        return $aliases;
    }
349399
public function getQueries($boolType = null)
    {
        if ($boolType === null) {
            $queries = [];

            foreach ($this->container as $item) {
                $queries = array_merge($queries, $item);
            }

            return $queries;
        }

        if (isset($this->container[$boolType])) {
            return $this->container[$boolType];
        }

        return [];
    }
673038
public function url($reset = true)
    {
        /** @var UniformResourceLocator $locator */
        $locator = Grav::instance()['locator'];
        $image_path = $locator->findResource('cache://images', true);
        $image_dir = $locator->findResource('cache://images', false);
        $saved_image_path = $this->saveImage();

        $output = preg_replace('|^' . preg_quote(GRAV_ROOT, '|') . '|', '', $saved_image_path);

        if ($locator->isStream($output)) {
            $output = $locator->findResource($output, false);
        }

        if (Utils::startsWith($output, $image_path)) {
            $output = '/' . $image_dir . preg_replace('|^' . preg_quote($image_path, '|') . '|', '', $output);
        }

        if ($reset) {
            $this->reset();
        }

        return trim(Grav::instance()['base_url'] . '/' . $this->urlQuerystring($output), '\\');
    }
1011905
protected function getModels($refresh = false)
    {
        if ($this->_models === null || $refresh) {
            $this->_models = [];
            if (isset($this->module->panels['profiling']->data['messages'])) {
                $this->_models = Yii::getLogger()->calculateTimings($this->module->panels['profiling']->data['messages']);
            }
        }
        return $this->_models;
    }
419378
public static function getBooleanStrings(bool $state = null): array
    {
        $strings = [
            false => ['', '0', 'false', 'no', 'off'],
            true => ['1', 'true', 'yes', 'on']
        ];
        
        return isset($state) ? $strings[$state] : array_merge($strings[false], $strings[true]);
    }
482903
public function countAllResults(string $table='', bool $reset = TRUE): int
	{
		// Set the table
		if ( ! empty($table))
		{
			$this->from($table);
		}

		$result = $this->_run('get', $table, NULL, NULL, $reset);
		$rows = $result->fetchAll();

		return (int) count($rows);
	}
1041487
public function path($reset = true)
    {
        $output = $this->saveImage();

        if ($reset) {
            $this->reset();
        }

        return $output;
    }
1037323
public function getBlameGuids($checkValid = false)
    {
        $multiBlamesAttribute = $this->multiBlamesAttribute;
        if ($multiBlamesAttribute === false) {
            return [];
        }
        $guids = Number::divide_guid_bin($this->$multiBlamesAttribute);
        if ($checkValid) {
            $guids = $this->unsetInvalidBlames($guids);
        }
        return $guids;
    }
486958
protected function _validate_bool($value)
    {
        $trueValues = ['1', 'true'];
        $falseValues = ['0', 'false'];

        if (in_array($value, $trueValues, true)) {
            return true;
        } elseif (in_array($value, $falseValues, true)) {
            return false;
        } else {
            return null;
        }
    }
593659
public static function &getParams($jname, $reset = false)
	{
		static $instances;
		if (!isset($instances)) {
			$instances = array();
		}

		try {
			//only create a new parameter instance if it has not been created before
			if (!isset($instances[$jname]) || $reset) {
				$db = self::getDBO();

				$query = $db->getQuery(true)
					->select('params')
					->from('#__jfusion')
					->where('name = ' . $db->quote($jname));

				$db->setQuery($query);
				$params = $db->loadResult();
				$instances[$jname] = new Registry($params);
			}
			return $instances[$jname];
		} catch (Exception $e) {
			return new Registry();
		}
	}
1257201
public function readOnly($bool = true){
		$list = $this->copy(false);
		$list->setReadOnly();
		return $list;
	}