Add docblocks

This commit is contained in:
Dennis Eichhorn 2017-02-22 20:29:17 +01:00
parent c64ddc5039
commit b8561385f5
2 changed files with 36 additions and 2 deletions

View File

@ -493,16 +493,42 @@ class Builder extends BuilderAbstract
return $this; return $this;
} }
public function getWhereByColumn($column) /**
* Get column of where condition
*
* One column can have multiple where conditions.
* TODO: maybe think about a case where there is a where condition but no column but some other identifier?
*
* @param mixed $column Column
*
* @return array|null
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public function getWhereByColumn($column) /* : ?array */
{ {
return $this->wheres[self::getPublicColumnName($column)] ?? null; return $this->wheres[self::getPublicColumnName($column)] ?? null;
} }
public function getTableOfSystem($expression, $systemIdentifier) /**
* Get table name of system
*
* @param mixed $expression System expression
* @param string $systemIdentifier System identifier
*
* @return string|null
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public function getTableOfSystem($expression, string $systemIdentifier) /* : ?string */
{ {
if(($pos = strpos($expression, $systemIdentifier . '.' . $systemIdentifier)) === false) { if(($pos = strpos($expression, $systemIdentifier . '.' . $systemIdentifier)) === false) {
return null; return null;
} }
return explode('.', $expression)[0];
} }
/** /**

View File

@ -154,6 +154,14 @@ class Request extends RequestAbstract
$this->uri = $this->uri ?? new Http(Http::getCurrent()); $this->uri = $this->uri ?? new Http(Http::getCurrent());
} }
/**
* Load request language
*
* @return string
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
private function loadRequestLanguage() : string private function loadRequestLanguage() : string
{ {
$lang = $_SERVER['HTTP_ACCEPT_LANGUAGE']; $lang = $_SERVER['HTTP_ACCEPT_LANGUAGE'];