Fetch entity data by Key Name

@param $str_key_name
@return mixed
437476
public function fetchByName($str_key_name)
    {
        $arr_results = $this->fetchByNames([$str_key_name]);
        if(count($arr_results) > 0) {
            return $arr_results[0];
        }
        return null;
    }
371109
public static function get($arr, $str_path, $default=null) {
		$path = explode('.', $str_path);
		return static::array_get($arr, $path, $default);
	}
1355788
def retrieve_data(key = '')
      key = key.to_s unless key.is_a? String
      data_array = @db.execute 'SELECT value FROM data WHERE key = ?', key
      Marshal.load(data_array[0][0]) unless data_array[0].nil?
    end
811311
protected function _fetch_object($class_name = 'stdClass')
	{
		// No native support for fetching rows as objects
		if (($row = $this->result_id->fetchArray(SQLITE3_ASSOC)) === FALSE)
		{
			return FALSE;
		}
		elseif ($class_name === 'stdClass')
		{
			return (object) $row;
		}

		$class_name = new $class_name();
		foreach (array_keys($row) as $key)
		{
			$class_name->$key = $row[$key];
		}

		return $class_name;
	}
675105
public function getData($key = ''){

        $key = $this->normalizeKeyName($key);

        if( $key === '' ){
            return $this->_data;
        }

        return isset($this->_data[$key]) ? $this->_data[$key] : NULL;
    }
946073
function fetchCollection($class_name = "stdClass")
    {
        /* backward compatibility, you can use object instead of class name */
        if (is_object($class_name)) {
            $class_name = get_class($class_name);
        }

        return $this->fetchAll(DB::FETCH_CLASS, $class_name);
    }
1028785
public function retrieve($key)
    {
        if (strpos($key, '.') !== FALSE) {
            list($name, $value) = explode('.', $key);

            if (empty($this->forms)) {
                $data        = $this->getModel()->where('name', '=', $name)->get();
                $this->forms = $this->processRetrievedData($data);
            }

            return Arr::get($this->forms, "{$name}.{$value}");
        }
    }
141027
public function fetchById($str_id)
    {
        return $this->obj_gateway
            ->withSchema($this->obj_schema)
            ->withTransaction($this->str_transaction_id)
            ->fetchById($str_id);
    }
674940
private function getEncryptionKey($str = null)
    {
        $key        = $this->getSalt();
        $key_crypt  = md5($key);
        $count      = 0;
        $tmp        = '';
        for ($ctr=0;$ctr<strlen($str);$ctr++) {
            if ($count==strlen($key_crypt)) {
                $count=0;
            }
            $tmp.= substr($str,$ctr,1) ^ substr($key_crypt,$count,1);
            $count++;
        }
        return $tmp;
    }
1072763
static function getParameter($connection_name, $key) {
		// don't reveal passwords through this interface
		if ('password' === $key) {
			throw new RuntimeException('DB::password is private');
		}

		if (!array_key_exists($connection_name, self::$parameters)) {
			throw new RuntimeException("Configuration for database '$connection_name' not loaded");
		}

		return @self::$parameters[$connection_name][$key];
	}
746974
public function unserialize($str, $entity, $name) {
		if($this->get('many')) {
			$r = new ManyCollection($entity, $name);
			$arr = unserialize($str);
			if(!is_array($arr))
				return $r;
			foreach($arr as $v)
				$r[] = $this->doUnserialize($v, $entity);
			return $r;
		}
		else
			return $this->doUnserialize($str, $entity);
	}
183342
public function fetchPairs($key, $value = null){
		$clone = clone $this;

		// If executed w/o needed cols, force exec w/ them.
		if(!in_array('*', $clone->columns)){
			if($value !== null)
				$clone->columns = array($key, $value);
			elseif(!in_array($key, $clone->columns))
				$clone->columns[] = $key;
		}
		$k = substr($key, ($pk = strrpos($key, '.')) ? $pk+1 : 0);
		$v = $value === null ? null : substr($value, ($pv = strrpos($value, '.')) ? $pv+1 : 0);

		$rows = array();
		while($row = $clone->fetch()){
			if(!$row)
				return array();
			$rows[$row[$k]] = $value === null ? $row : $row->$v;
		}

		return $rows;
	}
1179354
protected function getData() {
        if ($this->data === null) {
            $stmt = $this->db->get(
                $this->table,
                $this->where,
                $this->options + [Db::OPTION_FETCH_MODE => $this->getFetchArgs()]
            );

            $data = $stmt->fetchAll(...(array)$this->getFetchArgs());

            if (is_callable($this->rowCallback)) {
                array_walk($data, function (&$row) {
                    $row = call_user_func($this->rowCallback, $row);
                });
            }

            $this->data = $data;
        }

        return $this->data;
    }
1256384
protected function getInfo(
        /*# string */ $key,
        /*# string */ $method = 'server'
    ) {
        if ('server' === $method) {
            $key = strtoupper($key);
        }
        $data = $this->$method;

        if (empty($key)) {
            return $data;
        } elseif (isset($data[$key])) {
            return $data[$key];
        } else {
            return null;
        }
    }
991079
protected function getQuery($str_key, $str_default = NULL)
    {
        return (isset($_GET[$str_key]) ? $_GET[$str_key] : $str_default);
    }
564120
public function get($property_name) {
    if ($property_name === 'entity' && !isset($this->values[$property_name])) {
      $value = $this->values[$property_name] = SKU::loadFromSku($this->values['value'], $this->getLangcode());
      $this->properties[$property_name] = $this->getTypedDataManager()->getPropertyInstance($this, $property_name, $value);
    }
    return parent::get($property_name);
  }
360245
public function get($key, $default_val = null)
    {
        if ($this->exists($key)) {
            return $this->offsetGet($key);
        }

        return $default_val;
    }