Get a log.

@param  string      $date
@param  mixed|null  $default

@return \Arcanedev\LogViewer\Entities\Log

@throws \Arcanedev\LogViewer\Exceptions\LogNotFoundException
427529
public function get($date, $default = null)
    {
        if ( ! $this->has($date))
            throw new LogNotFoundException("Log not found in this date [$date]");

        return parent::get($date, $default);
    }
1286686
public function get($key, $default = null)
    {
        $this->checkLoaded();

        return Arr::get($this->data, $key, $default);
    }
696355
public static function getWeekBeginningForDate($date = null, $dateFormat = 'd/m/Y') {
        if (!$date)
            $date = date($dateFormat);

        $dateObj = date_create_from_format($dateFormat, $date);

        $initialDay = $dateObj->format("w");
        $startDayOfWeek = $initialDay == 0 ? 6 : $initialDay - 1;

        // If we need to back track to monday, do that now.
        if ($startDayOfWeek > 0) {
            $dateObj->sub(new \DateInterval ("P" . $startDayOfWeek . "D"));
        }

        return $dateObj->format($dateFormat);
    }
292549
final public static function dateSqlUtcToIsoOffset($date, $default = null)
    {
        if (!empty($date)) {
            $date = self::asDateTime($date);
            $date->setTimezone(self::tzUtc());
            return $date->format("Y-m-d\TH:i:sP");
        } else {
            return $default;
        }
    }
856980
public function getByDate(string $date)
    {
        // Log Debug
        $this->flow->getLogger()->debug("Retrieving Settlement by Date $date");

        return $this->make(
            $this->performGet(
                'date',
                $date,
                [
                    'method' => 'getByDate',
                ]
            )
        );
    }
196208
public function getLogManager(): ?LogManager
    {
        if (!$this->hasLogManager()) {
            $this->setLogManager($this->getDefaultLogManager());
        }
        return $this->logManager;
    }
335935
public function getHistory($date) {
    	try{
			if (empty($date))
				throw new Exception('Paramer "date" is required');


    		$params = array (
    		'date' => $date
    		);

    		$ret = $this->SendRequest->curl('/message/history.json',$params,'urlencoded','im','POST');
    		if(empty($ret))
    			throw new Exception('bad request');
    		return $ret;

    	}catch (Exception $e) {
    		print_r($e->getMessage());
    	}
   }
1231807
public static function getLogger($level = null)
    {
        if (empty($level)) {
            $level = static::DEFAULT_LEVEL;
        }

        if (empty(static::$logger)) {
            static::setLogger($level);
        }

        return static::$logger;
    }
935020
public function get()
    {
        $date = \DateTime::createFromFormat(static::$mysql_format, $this->seed);
        if ($date && $date->getTimestamp()) {
            return $date;
        }
        return new \DateTime($this->defaultValue);
    }
710640
static function fromDate($date = false)
    {
        $format = count(explode(" ", $date)) > 1 ? Settings\DefaultDateSettings::$defaultDateTimeFromat : Settings\DefaultDateSettings::$defaultDateFromat;
        return ($date) ? static::createFromFormat($format, $date) : new self();
    }
378534
public static function get($key=null,$default=null){
    return $key ? (filter_input(INPUT_GET,$key) ?: (is_callable($default)?call_user_func($default):$default)) : $_GET;
  }
833682
public function setDateFrom($date = null)
    {
        $date = $this->resolveCarbon($date);

        return $this->setDate($date->year, $date->month, $date->day);
    }
1121980
public static function readDate($date, string $type = 'date') {
		if (empty($date)) return null;
		// initialize default settings if not initialized
		if (empty(self::$options)) self::init();
		// convert numbers
		$date = self::numberToFromNativeLanguage($date . '', [], true);
		$date = str_replace([i18n(null, 'am'), i18n(null, 'pm')], ['am', 'pm'], $date);
		// dates are accepted as is
		if ($type == 'date') {
			$timezone = new DateTimeZone(self::$options['server_timezone_code']);
		} else {
			$timezone = new DateTimeZone(self::$options['timezone_code']);
		}
		// try to get a date from user format
		$object = DateTime::createFromFormat(self::$options['format_' . $type], $date, $timezone);
		if ($object === false) { // system format
			$object = DateTime::createFromFormat(self::$defaut_options['format_' . $type], $date, $timezone);
		}
		if ($object === false) { // strtotime
			$date = date('Y-m-d H:i:s', strtotime($date));
			$object = new DateTime($date, $timezone);
		}
		// convert between timezones
		$object->setTimezone(new DateTimeZone(self::$options['server_timezone_code']));
		return $object->format(self::$defaut_options['format_' . $type]);
	}
1017853
public function getStatementForDate($date)
    {
        if (is_string($date)) {
            $date = new \DateTime($date);
        }

        foreach ($this->statements as $stmt) {
            if ($stmt->getDate() == $date) {
                return $stmt;
            }
        }

        return null;
    }
490846
private function getLogOrFail($date)
    {
        try {
            return $this->logViewer->get($date);
        } catch (LogNotFound $e) {
            return abort(404, $e->getMessage());
        }
    }
497613
public function getDateTime(string $date, string $pattern = "Y-m-d H:i:s")
    {
        if (!$date)
            $this->data = date($pattern);
        else
            $this->prepareDateTime($date);

        if($this->erro || !isset($this->data['ano']) || !isset($this->data['mes']) || !isset($this->data['dia'])) {
            return null;
        } else {
            $strtoTime = "";
            if (isset($this->data['h']) && $this->data['h'] > 11) {
                $this->data['h'] -= 12;
                $strtoTime = "+12hours";
            }

            $originalDate = $this->data['ano'] . '-' . $this->data['mes'] . '-' . $this->data['dia'] . " " . ($this->data['h'] ?? 0) . ":" . ($this->data['i'] ?? 0) . ":" . ($this->data['s'] ?? 0);
            return date($pattern, strtotime($originalDate . $strtoTime));
        }
    }
299720
private function getTimeDrift(string $date) :? int
    {
        $now = new \DateTime();
        $now->format(\DateTime::RFC1123);

        try {
            $realDate = new DateTime($date);
        } catch (\Exception $e) {
            return null;
        }

        return (int)\abs($now->getTimestamp() - $realDate->getTimestamp());
    }