TODO

@return bool|string
976788
public static function getAppHash()
    {
        $bs = self::getSingleton();
        $config = $bs->getConfig();
        $string = $bs->getAppName();
        $string .= $bs->getConfigFile();
        $string .= $bs->getDirectory();
        $string .= __FILE__;
        return substr(md5($string), 0, 16);
    }
1188480
public function enabled() {
		$enabled = parent::enabled();

		if($enabled) {
			$enabled = ($this->client && $this->client->enabled());
		}

		return $enabled;
	}
1078023
public function false()
    {
        $message = ['%s is {{not|}} false', $this->value];
        $this->assert(($this->value === false), $message);

        return $this;
    }
256546
public function getInvoice(): ?Invoice
    {
        $invoice = null;

        if($this->invoiceId !== null)
            $invoice = Invoice::getById($this->invoiceId);

        /** @var Invoice $invoice */
        return $invoice;
    }
238277
protected function convertStringToBool($bool)
    {
        $bool = strtoupper($bool);

        if ($bool === strtoupper($this->schema->false())) {
            return false;
        } elseif ($bool === strtoupper($this->schema->true())) {
            return true;
        } else {
            return;
        }
    }
527025
public function method( $method = false ) : string
	{
		if( true === $method ){
			return (isset( $this->server['request_method'] ) ?? $this->server['request_method']);
		} elseif( !$this->method ){
			if( isset( $_server['http_x_method_override'] ) ){
				$this->method = strtoupper( $this->server['http_x_method_override'] );
			} else{
				$this->method = strtoupper( isset( $this->server['request_method'] ) ? $this->server['request_method'] : null );
			}
		}
		return $this->method;
	}
24010
public function getMetadata()
    {
        try {
            $path = $this->getPrefix();
            if ($this->getFileSystem()->has($path)) {
                return $this->getFileSystem()->get($path)->getMetadata();
            }

        } catch (FileNotFoundException $e) {
        }
        return false;
    }
1171639
public function toString()
    {
        $options = $this->toArray();

        //Transforms values as strings
        array_walk($options, function (&$value, $key) {
            if (is_array($value)) {
                $value = implode(' ', $value);
            } elseif (is_bool($value)) {
                $value = $value ? 'true' : 'false';
            } elseif (is_null($value)) {
                $value = 'null';
            }

            $value = $key . '="' . $value . '"';
        });

        return implode(' ', $options);
    }
837832
public function getAnchor()
    {
        if ($this->UrlSegment) {
            return Convert::raw2url($this->UrlSegment);
        }
        if ($this->Title) {
            return Convert::raw2url($this->Title);
        }
        return false;
    }
917738
public function build(bool $complete = true): string
    {
        $sql = [];
        $sql = $this->getSelectSql($sql);
        $sql = $this->getColumnsSql($sql);
        $sql = $this->getFromSql($sql);
        $sql = $this->getJoinSql($sql);
        $sql = $this->condition->getWhereSql($sql);
        $sql = $this->getGroupBySql($sql);
        $sql = $this->condition->getHavingSql($sql);
        $sql = $this->getOrderBySql($sql);
        $sql = $this->getLimitSql($sql);
        $sql = $this->getUnionSql($sql);
        $result = trim(implode(' ', $sql));
        $result = $this->getAliasSql($result);
        if ($complete) {
            $result = trim($result) . ';';
        }

        return $result;
    }
854126
public function validate()
    {
        if (!$this->getValidator()->validate($this, $this->_action)) {
            $this->_errors = $this->getValidator()->getErrors();
            return false;
        }
        return true;
    }
797353
public function valid()
    {
        $valid = $this->valid || $this->validOnNext;
        $this->validOnNext = $this->valid;

        return $valid;
    }
754459
public function validate()
    {
        $this->shouldValidate = false;

        if (parent::validates()) {
            $this->success = true;
        } else {
            $this->fail();
        }

        return $this;
    }
1220327
public function type()
    {
        if ($this->type === null) {
            $this->type = self::DEFAULT_INPUT_TYPE;
        }

        return $this->type;
    }
711211
public function parse()
	{
		while ($this->state && $this->state !== 'emit' && $this->has_data())
		{
			$state = $this->state;
			$this->$state();
		}
		$this->data = '';
		if ($this->state === 'emit' || $this->state === 'body')
		{
			return true;
		}

		$this->http_version = '';
		$this->status_code = '';
		$this->reason = '';
		$this->headers = array();
		$this->body = '';
		return false;
	}
298534
public function get()
    {
        $result = $this->_environment ? $this->_environment->getenv($this->_name) : getenv($this->_name);

        return $result !== false ? $result : null;
    }
1181674
public function delete()
    {
        if ($this->exists())
        {
            $deletedLeft = $this->left->delete();
            $deletedRight = $this->right->delete();

            return $deletedLeft && $deletedRight;
        }

        return false;
    }