id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
192,500
net-tools/core
src/Helpers/NetworkingHelper.php
NetworkingHelper.sendXmlHttpResponseHeaders
static function sendXmlHttpResponseHeaders($contenttype = "application/json", $charset = 'utf-8') { if ( is_null($charset) ) $charset = mb_internal_encoding(); // charset header("Content-Type: $contenttype; charset=$charset"); // no cache header("Expires: Sat, 1 Jan 2005 00:00:00 GMT"); header("L...
php
static function sendXmlHttpResponseHeaders($contenttype = "application/json", $charset = 'utf-8') { if ( is_null($charset) ) $charset = mb_internal_encoding(); // charset header("Content-Type: $contenttype; charset=$charset"); // no cache header("Expires: Sat, 1 Jan 2005 00:00:00 GMT"); header("L...
[ "static", "function", "sendXmlHttpResponseHeaders", "(", "$", "contenttype", "=", "\"application/json\"", ",", "$", "charset", "=", "'utf-8'", ")", "{", "if", "(", "is_null", "(", "$", "charset", ")", ")", "$", "charset", "=", "mb_internal_encoding", "(", ")",...
Output http headers suitable for xmlhttp @param string $contenttype Content-type to output @param string $charset Charset of content
[ "Output", "http", "headers", "suitable", "for", "xmlhttp" ]
51446641cee22c0cf53d2b409c76cc8bd1a187e7
https://github.com/net-tools/core/blob/51446641cee22c0cf53d2b409c76cc8bd1a187e7/src/Helpers/NetworkingHelper.php#L28-L41
192,501
net-tools/core
src/Helpers/NetworkingHelper.php
NetworkingHelper.appendToUrl
static function appendToUrl($url, $append) { if ( $append ) { $regs = []; if ( preg_match('|^(.+?)(?:\?(.*?))?(#.*)?$|', $url, $regs) ) { $u = $regs[1]; // URL part $q = $regs[2]; // querystring $a = $regs[3]; // anchor #xxxx // append a new parameter if one or more already exis...
php
static function appendToUrl($url, $append) { if ( $append ) { $regs = []; if ( preg_match('|^(.+?)(?:\?(.*?))?(#.*)?$|', $url, $regs) ) { $u = $regs[1]; // URL part $q = $regs[2]; // querystring $a = $regs[3]; // anchor #xxxx // append a new parameter if one or more already exis...
[ "static", "function", "appendToUrl", "(", "$", "url", ",", "$", "append", ")", "{", "if", "(", "$", "append", ")", "{", "$", "regs", "=", "[", "]", ";", "if", "(", "preg_match", "(", "'|^(.+?)(?:\\?(.*?))?(#.*)?$|'", ",", "$", "url", ",", "$", "regs"...
Append a parameter to an url @param string $url Url string to process @param string $append Querystring to append to $url @return string Return a new url with appended string
[ "Append", "a", "parameter", "to", "an", "url" ]
51446641cee22c0cf53d2b409c76cc8bd1a187e7
https://github.com/net-tools/core/blob/51446641cee22c0cf53d2b409c76cc8bd1a187e7/src/Helpers/NetworkingHelper.php#L51-L77
192,502
wasinger/adaptimage
src/Output/OutputTypeOptionsJpeg.php
OutputTypeOptionsJpeg.getFilters
public function getFilters() { if ($this->progressive) { $fc = new FilterChain(); $fc->add(new Interlace(ImageInterface::INTERLACE_PLANE)); return $fc; } else { return null; } }
php
public function getFilters() { if ($this->progressive) { $fc = new FilterChain(); $fc->add(new Interlace(ImageInterface::INTERLACE_PLANE)); return $fc; } else { return null; } }
[ "public", "function", "getFilters", "(", ")", "{", "if", "(", "$", "this", "->", "progressive", ")", "{", "$", "fc", "=", "new", "FilterChain", "(", ")", ";", "$", "fc", "->", "add", "(", "new", "Interlace", "(", "ImageInterface", "::", "INTERLACE_PLAN...
Return a FilterChain with Filters for postprocessing the image @return FilterChain|null
[ "Return", "a", "FilterChain", "with", "Filters", "for", "postprocessing", "the", "image" ]
7b529b25081b399451c8bbd56d0cef7daaa83ec4
https://github.com/wasinger/adaptimage/blob/7b529b25081b399451c8bbd56d0cef7daaa83ec4/src/Output/OutputTypeOptionsJpeg.php#L48-L57
192,503
RedCirclePL/ConsoleProcessManagerBundle
Entity/Call.php
Call.getExecutionTimeProportion
public function getExecutionTimeProportion() { if ($this->getExecutionTime() && $this->getProcess()->getAvgExecutionTime()) { return round($this->getExecutionTime() / $this->getProcess()->getAvgExecutionTime(), 2); } elseif ($this->getExecutionTime()) { return $this->getExecu...
php
public function getExecutionTimeProportion() { if ($this->getExecutionTime() && $this->getProcess()->getAvgExecutionTime()) { return round($this->getExecutionTime() / $this->getProcess()->getAvgExecutionTime(), 2); } elseif ($this->getExecutionTime()) { return $this->getExecu...
[ "public", "function", "getExecutionTimeProportion", "(", ")", "{", "if", "(", "$", "this", "->", "getExecutionTime", "(", ")", "&&", "$", "this", "->", "getProcess", "(", ")", "->", "getAvgExecutionTime", "(", ")", ")", "{", "return", "round", "(", "$", ...
Returns proportion between execution time and avg execution time @return float
[ "Returns", "proportion", "between", "execution", "time", "and", "avg", "execution", "time" ]
76b17924d3b7faf81f81f5fdaa96555200dee66b
https://github.com/RedCirclePL/ConsoleProcessManagerBundle/blob/76b17924d3b7faf81f81f5fdaa96555200dee66b/Entity/Call.php#L221-L232
192,504
RedCirclePL/ConsoleProcessManagerBundle
Entity/Call.php
Call.countErrorsForProcess
public function countErrorsForProcess(LifecycleEventArgs $event) { $entityManager = $event->getEntityManager(); $repository = $entityManager->getRepository(get_class($this)); $repository->countByProcessIdAndStatus( $this->getProcess(), [self::STATUS_FAILED, self::...
php
public function countErrorsForProcess(LifecycleEventArgs $event) { $entityManager = $event->getEntityManager(); $repository = $entityManager->getRepository(get_class($this)); $repository->countByProcessIdAndStatus( $this->getProcess(), [self::STATUS_FAILED, self::...
[ "public", "function", "countErrorsForProcess", "(", "LifecycleEventArgs", "$", "event", ")", "{", "$", "entityManager", "=", "$", "event", "->", "getEntityManager", "(", ")", ";", "$", "repository", "=", "$", "entityManager", "->", "getRepository", "(", "get_cla...
Gets triggered only after update @ORM\PostUpdate @param LifecycleEventArgs $event
[ "Gets", "triggered", "only", "after", "update" ]
76b17924d3b7faf81f81f5fdaa96555200dee66b
https://github.com/RedCirclePL/ConsoleProcessManagerBundle/blob/76b17924d3b7faf81f81f5fdaa96555200dee66b/Entity/Call.php#L309-L320
192,505
Hnto/nuki
src/Providers/Core/Output/Base.php
Base.buildRenderer
private function buildRenderer($render = 'foil', array $renderingInfo = []) { switch($render) { case "raw": $renderer = new RawRenderer(); $renderInfo = []; break; case "json": $renderer = new JsonRenderer(); $renderInfo = []; br...
php
private function buildRenderer($render = 'foil', array $renderingInfo = []) { switch($render) { case "raw": $renderer = new RawRenderer(); $renderInfo = []; break; case "json": $renderer = new JsonRenderer(); $renderInfo = []; br...
[ "private", "function", "buildRenderer", "(", "$", "render", "=", "'foil'", ",", "array", "$", "renderingInfo", "=", "[", "]", ")", "{", "switch", "(", "$", "render", ")", "{", "case", "\"raw\"", ":", "$", "renderer", "=", "new", "RawRenderer", "(", ")"...
Build, setup and return renderer @param string $render @param array $renderingInfo @return \Nuki\Skeletons\Handlers\Renderer
[ "Build", "setup", "and", "return", "renderer" ]
c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c
https://github.com/Hnto/nuki/blob/c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c/src/Providers/Core/Output/Base.php#L84-L108
192,506
agentmedia/phine-core
src/Core/Logic/Tree/TreeBuilder.php
TreeBuilder.Insert
function Insert($item, $parent = null, $previous = null) { if ($previous) { $parent = $this->provider->ParentOf($previous); } $oldNext = $this->provider->NextOf($item); $oldPrev = $this->provider->PreviousOf($item); $oldFirst = $this->provider->FirstChildO...
php
function Insert($item, $parent = null, $previous = null) { if ($previous) { $parent = $this->provider->ParentOf($previous); } $oldNext = $this->provider->NextOf($item); $oldPrev = $this->provider->PreviousOf($item); $oldFirst = $this->provider->FirstChildO...
[ "function", "Insert", "(", "$", "item", ",", "$", "parent", "=", "null", ",", "$", "previous", "=", "null", ")", "{", "if", "(", "$", "previous", ")", "{", "$", "parent", "=", "$", "this", "->", "provider", "->", "ParentOf", "(", "$", "previous", ...
Inserts the item @param mixed $item @param mixed $parent @param mixed $previous
[ "Inserts", "the", "item" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Tree/TreeBuilder.php#L28-L47
192,507
agentmedia/phine-core
src/Core/Logic/Tree/TreeBuilder.php
TreeBuilder.Remove
function Remove($item) { $prev = $this->provider->PreviousOf($item); $next = $this->provider->NextOf($item); if ($next) { $this->provider->SetPrevious($next, $prev); } $this->provider->Delete($item); if ($next) { $this->provide...
php
function Remove($item) { $prev = $this->provider->PreviousOf($item); $next = $this->provider->NextOf($item); if ($next) { $this->provider->SetPrevious($next, $prev); } $this->provider->Delete($item); if ($next) { $this->provide...
[ "function", "Remove", "(", "$", "item", ")", "{", "$", "prev", "=", "$", "this", "->", "provider", "->", "PreviousOf", "(", "$", "item", ")", ";", "$", "next", "=", "$", "this", "->", "provider", "->", "NextOf", "(", "$", "item", ")", ";", "if", ...
Removes the item @param mixed $item
[ "Removes", "the", "item" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Tree/TreeBuilder.php#L91-L104
192,508
erenmustafaozdal/laravel-modules-base
src/Traits/ModelDataTrait.php
ModelDataTrait.getPhoto
public function getPhoto($attributes = [], $type='original', $onlyUrl = false, $modelSlug = null, $relation = null) { $this->setAttributes($modelSlug,'photo'); $photo = $this->getFile(); if( ! is_null($photo)) { $src = $this->getFileSrc($photo, $relation, $type); ...
php
public function getPhoto($attributes = [], $type='original', $onlyUrl = false, $modelSlug = null, $relation = null) { $this->setAttributes($modelSlug,'photo'); $photo = $this->getFile(); if( ! is_null($photo)) { $src = $this->getFileSrc($photo, $relation, $type); ...
[ "public", "function", "getPhoto", "(", "$", "attributes", "=", "[", "]", ",", "$", "type", "=", "'original'", ",", "$", "onlyUrl", "=", "false", ",", "$", "modelSlug", "=", "null", ",", "$", "relation", "=", "null", ")", "{", "$", "this", "->", "se...
get the html photo element @param array $attributes @param string $type original or thumbnails key @param boolean $onlyUrl @param string|null $modelSlug @param string|null $relation @return string
[ "get", "the", "html", "photo", "element" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Traits/ModelDataTrait.php#L94-L108
192,509
erenmustafaozdal/laravel-modules-base
src/Traits/ModelDataTrait.php
ModelDataTrait.getDocument
public function getDocument($attributes = [], $onlyUrl = false, $modelSlug = null, $relation = null) { $this->setAttributes($modelSlug,'file'); $file = $this->getFile(); if (is_null($file)) { return ''; } $src = $this->getFileDownloadSrc($file, $relation)...
php
public function getDocument($attributes = [], $onlyUrl = false, $modelSlug = null, $relation = null) { $this->setAttributes($modelSlug,'file'); $file = $this->getFile(); if (is_null($file)) { return ''; } $src = $this->getFileDownloadSrc($file, $relation)...
[ "public", "function", "getDocument", "(", "$", "attributes", "=", "[", "]", ",", "$", "onlyUrl", "=", "false", ",", "$", "modelSlug", "=", "null", ",", "$", "relation", "=", "null", ")", "{", "$", "this", "->", "setAttributes", "(", "$", "modelSlug", ...
get the html document element @param array $attributes @param boolean $onlyUrl @param string|null $modelSlug @param string|null $relation @return string
[ "get", "the", "html", "document", "element" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Traits/ModelDataTrait.php#L119-L130
192,510
erenmustafaozdal/laravel-modules-base
src/Traits/ModelDataTrait.php
ModelDataTrait.setAttributes
private function setAttributes($modelSlug, $type) { $this->module = getModule(get_class($this)); $this->modelSlug = is_null($modelSlug) ? getModelSlug($this) : $modelSlug; $this->options = config("{$this->module}.{$this->modelSlug}.uploads.{$type}"); $this->column = $this->optio...
php
private function setAttributes($modelSlug, $type) { $this->module = getModule(get_class($this)); $this->modelSlug = is_null($modelSlug) ? getModelSlug($this) : $modelSlug; $this->options = config("{$this->module}.{$this->modelSlug}.uploads.{$type}"); $this->column = $this->optio...
[ "private", "function", "setAttributes", "(", "$", "modelSlug", ",", "$", "type", ")", "{", "$", "this", "->", "module", "=", "getModule", "(", "get_class", "(", "$", "this", ")", ")", ";", "$", "this", "->", "modelSlug", "=", "is_null", "(", "$", "mo...
set the model specific attribute @param string $modelSlug @param string $type
[ "set", "the", "model", "specific", "attribute" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Traits/ModelDataTrait.php#L138-L144
192,511
erenmustafaozdal/laravel-modules-base
src/Traits/ModelDataTrait.php
ModelDataTrait.getFileSrc
private function getFileSrc($file, $relation, $type = null) { $id = is_null($relation) ? $this->id : $this->$relation; $src = $this->options['path']."/{$id}/"; if (is_null($type)) { return $src . $file; } $src .= $type === 'original' ? "original/{$file}" :...
php
private function getFileSrc($file, $relation, $type = null) { $id = is_null($relation) ? $this->id : $this->$relation; $src = $this->options['path']."/{$id}/"; if (is_null($type)) { return $src . $file; } $src .= $type === 'original' ? "original/{$file}" :...
[ "private", "function", "getFileSrc", "(", "$", "file", ",", "$", "relation", ",", "$", "type", "=", "null", ")", "{", "$", "id", "=", "is_null", "(", "$", "relation", ")", "?", "$", "this", "->", "id", ":", "$", "this", "->", "$", "relation", ";"...
get the file src @param string $file @param string|null $relation @param string|null $type @return string
[ "get", "the", "file", "src" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Traits/ModelDataTrait.php#L165-L174
192,512
erenmustafaozdal/laravel-modules-base
src/Traits/ModelDataTrait.php
ModelDataTrait.getFileDownloadSrc
private function getFileDownloadSrc($file, $relation) { $id = is_null($relation) ? $this->id : $this->$relation; return route('download.document',['id' => $id]); }
php
private function getFileDownloadSrc($file, $relation) { $id = is_null($relation) ? $this->id : $this->$relation; return route('download.document',['id' => $id]); }
[ "private", "function", "getFileDownloadSrc", "(", "$", "file", ",", "$", "relation", ")", "{", "$", "id", "=", "is_null", "(", "$", "relation", ")", "?", "$", "this", "->", "id", ":", "$", "this", "->", "$", "relation", ";", "return", "route", "(", ...
get the file download src @param string $file @param string|null $relation @return string
[ "get", "the", "file", "download", "src" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Traits/ModelDataTrait.php#L183-L187
192,513
erenmustafaozdal/laravel-modules-base
src/Traits/ModelDataTrait.php
ModelDataTrait.getHTMLAttributes
private function getHTMLAttributes($attributes) { $attr = ''; foreach($attributes as $key => $value) { $attr .= $key.'="'.$value.'" '; } return $attr; }
php
private function getHTMLAttributes($attributes) { $attr = ''; foreach($attributes as $key => $value) { $attr .= $key.'="'.$value.'" '; } return $attr; }
[ "private", "function", "getHTMLAttributes", "(", "$", "attributes", ")", "{", "$", "attr", "=", "''", ";", "foreach", "(", "$", "attributes", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "attr", ".=", "$", "key", ".", "'=\"'", ".", "$", "va...
get html attribute for file @param array $attributes @return string
[ "get", "html", "attribute", "for", "file" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Traits/ModelDataTrait.php#L195-L202
192,514
erenmustafaozdal/laravel-modules-base
src/Traits/ModelDataTrait.php
ModelDataTrait.scopeExtrasWithValues
public function scopeExtrasWithValues($query, $model) { $modelSlug = $model ? getModelSlug($model) : false; return $query->with([ 'extras' => function($query) use($model,$modelSlug) { if ( ! $model ) return $query; return $query->with(...
php
public function scopeExtrasWithValues($query, $model) { $modelSlug = $model ? getModelSlug($model) : false; return $query->with([ 'extras' => function($query) use($model,$modelSlug) { if ( ! $model ) return $query; return $query->with(...
[ "public", "function", "scopeExtrasWithValues", "(", "$", "query", ",", "$", "model", ")", "{", "$", "modelSlug", "=", "$", "model", "?", "getModelSlug", "(", "$", "model", ")", ":", "false", ";", "return", "$", "query", "->", "with", "(", "[", "'extras...
get extra column datas with model values @param \Illuminate\Database\Eloquent\Builder $query @param $model @return \Illuminate\Database\Eloquent\Builder
[ "get", "extra", "column", "datas", "with", "model", "values" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Traits/ModelDataTrait.php#L221-L237
192,515
erenmustafaozdal/laravel-modules-base
src/Traits/ModelDataTrait.php
ModelDataTrait.setSlugAttribute
public function setSlugAttribute($slug) { if ( ! $slug) { $title = is_null($this->name) ? $this->title : $this->name; $slug = str_slug($title, '-'); } $this->attributes['slug'] = $slug; }
php
public function setSlugAttribute($slug) { if ( ! $slug) { $title = is_null($this->name) ? $this->title : $this->name; $slug = str_slug($title, '-'); } $this->attributes['slug'] = $slug; }
[ "public", "function", "setSlugAttribute", "(", "$", "slug", ")", "{", "if", "(", "!", "$", "slug", ")", "{", "$", "title", "=", "is_null", "(", "$", "this", "->", "name", ")", "?", "$", "this", "->", "title", ":", "$", "this", "->", "name", ";", ...
Set slug encrypted @param $slug
[ "Set", "slug", "encrypted" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Traits/ModelDataTrait.php#L331-L339
192,516
erenmustafaozdal/laravel-modules-base
src/Traits/ModelDataTrait.php
ModelDataTrait.setIsActiveAttribute
public function setIsActiveAttribute($value) { $this->attributes['is_active'] = $value == 1 || $value === 'true' || $value === true ? true : false; }
php
public function setIsActiveAttribute($value) { $this->attributes['is_active'] = $value == 1 || $value === 'true' || $value === true ? true : false; }
[ "public", "function", "setIsActiveAttribute", "(", "$", "value", ")", "{", "$", "this", "->", "attributes", "[", "'is_active'", "]", "=", "$", "value", "==", "1", "||", "$", "value", "===", "'true'", "||", "$", "value", "===", "true", "?", "true", ":",...
Set the is_active attribute. @param boolean $value @return string
[ "Set", "the", "is_active", "attribute", "." ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Traits/ModelDataTrait.php#L347-L350
192,517
erenmustafaozdal/laravel-modules-base
src/Traits/ModelDataTrait.php
ModelDataTrait.setIsPublishAttribute
public function setIsPublishAttribute($is_publish) { $this->attributes['is_publish'] = $is_publish == 1 || $is_publish === 'true' || $is_publish === true ? true : false; }
php
public function setIsPublishAttribute($is_publish) { $this->attributes['is_publish'] = $is_publish == 1 || $is_publish === 'true' || $is_publish === true ? true : false; }
[ "public", "function", "setIsPublishAttribute", "(", "$", "is_publish", ")", "{", "$", "this", "->", "attributes", "[", "'is_publish'", "]", "=", "$", "is_publish", "==", "1", "||", "$", "is_publish", "===", "'true'", "||", "$", "is_publish", "===", "true", ...
Set the is_publish attribute. @param boolean $is_publish @return string
[ "Set", "the", "is_publish", "attribute", "." ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Traits/ModelDataTrait.php#L369-L372
192,518
erenmustafaozdal/laravel-modules-base
src/Traits/ModelDataTrait.php
ModelDataTrait.getCreatedAtAttribute
public function getCreatedAtAttribute($date) { $module = getModule(get_class()); return Carbon::parse($date)->format(config("{$module}.date_format")); }
php
public function getCreatedAtAttribute($date) { $module = getModule(get_class()); return Carbon::parse($date)->format(config("{$module}.date_format")); }
[ "public", "function", "getCreatedAtAttribute", "(", "$", "date", ")", "{", "$", "module", "=", "getModule", "(", "get_class", "(", ")", ")", ";", "return", "Carbon", "::", "parse", "(", "$", "date", ")", "->", "format", "(", "config", "(", "\"{$module}.d...
Get the created_at attribute. @param $date @return string
[ "Get", "the", "created_at", "attribute", "." ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Traits/ModelDataTrait.php#L391-L395
192,519
erenmustafaozdal/laravel-modules-base
src/Traits/ModelDataTrait.php
ModelDataTrait.getAspectRatioAttribute
public function getAspectRatioAttribute() { if ($this->photo_width == 0 || $this->photo_height == 0) { return null; } return $this->photo_width/$this->photo_height; }
php
public function getAspectRatioAttribute() { if ($this->photo_width == 0 || $this->photo_height == 0) { return null; } return $this->photo_width/$this->photo_height; }
[ "public", "function", "getAspectRatioAttribute", "(", ")", "{", "if", "(", "$", "this", "->", "photo_width", "==", "0", "||", "$", "this", "->", "photo_height", "==", "0", ")", "{", "return", "null", ";", "}", "return", "$", "this", "->", "photo_width", ...
get the aspect ration with photo width and photo height @return float|null
[ "get", "the", "aspect", "ration", "with", "photo", "width", "and", "photo", "height" ]
c26600543817642926bcf16ada84009e00d784e0
https://github.com/erenmustafaozdal/laravel-modules-base/blob/c26600543817642926bcf16ada84009e00d784e0/src/Traits/ModelDataTrait.php#L742-L748
192,520
ScaraMVC/Framework
src/Scara/Pagination/Pagination.php
Pagination.setModel
public function setModel(Model $model, $capsule) { $this->_model = $model; $this->_capsule = $capsule; return $this; }
php
public function setModel(Model $model, $capsule) { $this->_model = $model; $this->_capsule = $capsule; return $this; }
[ "public", "function", "setModel", "(", "Model", "$", "model", ",", "$", "capsule", ")", "{", "$", "this", "->", "_model", "=", "$", "model", ";", "$", "this", "->", "_capsule", "=", "$", "capsule", ";", "return", "$", "this", ";", "}" ]
Sets the model instance for the Pagination class. @param \Scara\Http\Model $model @param \Illuminate\Database\Query\Builder $capsule @return \Scara\Pagination\Pagination
[ "Sets", "the", "model", "instance", "for", "the", "Pagination", "class", "." ]
199b08b45fadf5dae14ac4732af03b36e15bbef2
https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Pagination/Pagination.php#L91-L97
192,521
ScaraMVC/Framework
src/Scara/Pagination/Pagination.php
Pagination.paginate
public function paginate() { $count = count($this->_model->all()); $this->_totalPages = ceil($count / $this->_limit); $page_at_offset = floor($this->_page + 1 / $this->_limit); $this->_offset = ($page_at_offset - 1) * $this->_limit; $this->_results = $this->_model->select($t...
php
public function paginate() { $count = count($this->_model->all()); $this->_totalPages = ceil($count / $this->_limit); $page_at_offset = floor($this->_page + 1 / $this->_limit); $this->_offset = ($page_at_offset - 1) * $this->_limit; $this->_results = $this->_model->select($t...
[ "public", "function", "paginate", "(", ")", "{", "$", "count", "=", "count", "(", "$", "this", "->", "_model", "->", "all", "(", ")", ")", ";", "$", "this", "->", "_totalPages", "=", "ceil", "(", "$", "count", "/", "$", "this", "->", "_limit", ")...
Handles the pagination. @return \Scara\Pagination\Pagination
[ "Handles", "the", "pagination", "." ]
199b08b45fadf5dae14ac4732af03b36e15bbef2
https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Pagination/Pagination.php#L118-L128
192,522
ScaraMVC/Framework
src/Scara/Pagination/Pagination.php
Pagination.render
public function render($path = 'basic', $views = null) { $view = new View(); if (is_null($views)) { $views = __DIR__.'/views/'; } $view->createBlade($views, $this->_config->get('cache')); return $view->with('pagination', [ 'currentPage' => $this->_pa...
php
public function render($path = 'basic', $views = null) { $view = new View(); if (is_null($views)) { $views = __DIR__.'/views/'; } $view->createBlade($views, $this->_config->get('cache')); return $view->with('pagination', [ 'currentPage' => $this->_pa...
[ "public", "function", "render", "(", "$", "path", "=", "'basic'", ",", "$", "views", "=", "null", ")", "{", "$", "view", "=", "new", "View", "(", ")", ";", "if", "(", "is_null", "(", "$", "views", ")", ")", "{", "$", "views", "=", "__DIR__", "....
Renders pagination links. @param string $path - The view path @param string $views - Where the pagination view is stored @return mixed
[ "Renders", "pagination", "links", "." ]
199b08b45fadf5dae14ac4732af03b36e15bbef2
https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Pagination/Pagination.php#L158-L171
192,523
AlexanderPoellmann/Laravel-Settings
src/Driver/Driver.php
Driver.set
public function set( $key, $value = null, $group = '' ) { $this->checkLoaded(); $this->modified = true; if ( is_array($key) ) { foreach ( $key as $k => $v ) { SettingsUtilities::set($this->storage, $k, $v); } } else { SettingsUtilities::set($this->storage, $key, $value); } }
php
public function set( $key, $value = null, $group = '' ) { $this->checkLoaded(); $this->modified = true; if ( is_array($key) ) { foreach ( $key as $k => $v ) { SettingsUtilities::set($this->storage, $k, $v); } } else { SettingsUtilities::set($this->storage, $key, $value); } }
[ "public", "function", "set", "(", "$", "key", ",", "$", "value", "=", "null", ",", "$", "group", "=", "''", ")", "{", "$", "this", "->", "checkLoaded", "(", ")", ";", "$", "this", "->", "modified", "=", "true", ";", "if", "(", "is_array", "(", ...
Store an item in the configuration for a given number of minutes. @param string $key @param mixed $value @param string $group
[ "Store", "an", "item", "in", "the", "configuration", "for", "a", "given", "number", "of", "minutes", "." ]
bf06f78cbbf86adb8576a29caae496d1e03b32ab
https://github.com/AlexanderPoellmann/Laravel-Settings/blob/bf06f78cbbf86adb8576a29caae496d1e03b32ab/src/Driver/Driver.php#L77-L89
192,524
MasterkeyInformatica/browser-kit
History.php
History.add
public function add(Request $request) { $this->stack = array_slice($this->stack, 0, $this->position + 1); $this->stack[] = clone $request; $this->position = count($this->stack) - 1; }
php
public function add(Request $request) { $this->stack = array_slice($this->stack, 0, $this->position + 1); $this->stack[] = clone $request; $this->position = count($this->stack) - 1; }
[ "public", "function", "add", "(", "Request", "$", "request", ")", "{", "$", "this", "->", "stack", "=", "array_slice", "(", "$", "this", "->", "stack", ",", "0", ",", "$", "this", "->", "position", "+", "1", ")", ";", "$", "this", "->", "stack", ...
Adds a Request to the history. @param Request $request A Request instance
[ "Adds", "a", "Request", "to", "the", "history", "." ]
fd735ad31c00af54d5c060d01218aa48308557f7
https://github.com/MasterkeyInformatica/browser-kit/blob/fd735ad31c00af54d5c060d01218aa48308557f7/History.php#L38-L43
192,525
MasterkeyInformatica/browser-kit
History.php
History.forward
public function forward() { if ($this->position > count($this->stack) - 2) { throw new \LogicException('You are already on the last page.'); } return clone $this->stack[++$this->position]; }
php
public function forward() { if ($this->position > count($this->stack) - 2) { throw new \LogicException('You are already on the last page.'); } return clone $this->stack[++$this->position]; }
[ "public", "function", "forward", "(", ")", "{", "if", "(", "$", "this", "->", "position", ">", "count", "(", "$", "this", "->", "stack", ")", "-", "2", ")", "{", "throw", "new", "\\", "LogicException", "(", "'You are already on the last page.'", ")", ";"...
Goes forward in the history. @return Request A Request instance @throws \LogicException if the stack is already on the last page
[ "Goes", "forward", "in", "the", "history", "." ]
fd735ad31c00af54d5c060d01218aa48308557f7
https://github.com/MasterkeyInformatica/browser-kit/blob/fd735ad31c00af54d5c060d01218aa48308557f7/History.php#L78-L85
192,526
ZFrapid/zfrapid-domain
src/Storage/AbstractStorage.php
AbstractStorage.fetchAllEntities
public function fetchAllEntities() { $select = $this->tableGateway->getSql()->select(); return $this->tableGateway->fetchCollection($select); }
php
public function fetchAllEntities() { $select = $this->tableGateway->getSql()->select(); return $this->tableGateway->fetchCollection($select); }
[ "public", "function", "fetchAllEntities", "(", ")", "{", "$", "select", "=", "$", "this", "->", "tableGateway", "->", "getSql", "(", ")", "->", "select", "(", ")", ";", "return", "$", "this", "->", "tableGateway", "->", "fetchCollection", "(", "$", "sele...
Fetch all entities @return array
[ "Fetch", "all", "entities" ]
a8b0c787da9356512b6f4ee5958d6c85c3a8ecef
https://github.com/ZFrapid/zfrapid-domain/blob/a8b0c787da9356512b6f4ee5958d6c85c3a8ecef/src/Storage/AbstractStorage.php#L57-L62
192,527
ZFrapid/zfrapid-domain
src/Storage/AbstractStorage.php
AbstractStorage.fetchEntityById
public function fetchEntityById($id) { $select = $this->tableGateway->getSql()->select(); $select->where->equalTo($this->tableGateway->getPrimaryKey(), $id); return $this->tableGateway->fetchEntity($select); }
php
public function fetchEntityById($id) { $select = $this->tableGateway->getSql()->select(); $select->where->equalTo($this->tableGateway->getPrimaryKey(), $id); return $this->tableGateway->fetchEntity($select); }
[ "public", "function", "fetchEntityById", "(", "$", "id", ")", "{", "$", "select", "=", "$", "this", "->", "tableGateway", "->", "getSql", "(", ")", "->", "select", "(", ")", ";", "$", "select", "->", "where", "->", "equalTo", "(", "$", "this", "->", ...
Fetch entity by id @param $id @return mixed
[ "Fetch", "entity", "by", "id" ]
a8b0c787da9356512b6f4ee5958d6c85c3a8ecef
https://github.com/ZFrapid/zfrapid-domain/blob/a8b0c787da9356512b6f4ee5958d6c85c3a8ecef/src/Storage/AbstractStorage.php#L71-L77
192,528
wb-crowdfusion/crowdfusion
system/core/classes/libraries/utils/ArrayUtils.php
ArrayUtils.htmlArrayFlatten
public static function htmlArrayFlatten($array_to_flatten, $parents = array ()) { // Returns an array that has been "flattened", suitable for use in html forms. $flattened = array (); foreach ($array_to_flatten as $key => $value) { if (is_array($value)) { // Ugl...
php
public static function htmlArrayFlatten($array_to_flatten, $parents = array ()) { // Returns an array that has been "flattened", suitable for use in html forms. $flattened = array (); foreach ($array_to_flatten as $key => $value) { if (is_array($value)) { // Ugl...
[ "public", "static", "function", "htmlArrayFlatten", "(", "$", "array_to_flatten", ",", "$", "parents", "=", "array", "(", ")", ")", "{", "// Returns an array that has been \"flattened\", suitable for use in html forms.", "$", "flattened", "=", "array", "(", ")", ";", ...
Returns an array that has been "flattened", suitable for use in html forms. For example, an array like ['cache' => 'Craig', 'Fusion' => ['data' => 'fed', 'foo' => 'bar']] becomes ['cache' => 'Craig', 'Fusion[data]' => 'fed', 'Fusion[foo]' => 'bar'] @param array $array_to_flatten Array to flatten @param array $parents...
[ "Returns", "an", "array", "that", "has", "been", "flattened", "suitable", "for", "use", "in", "html", "forms", "." ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/utils/ArrayUtils.php#L73-L118
192,529
wb-crowdfusion/crowdfusion
system/core/classes/libraries/utils/ArrayUtils.php
ArrayUtils.arrayMultiMergeKeys
public static function arrayMultiMergeKeys() { $args = func_get_args(); $result = array (); foreach ($args as $array) { foreach ($array as $key => $row) { foreach ($row as $name => $value) { $result[$key][$name] = $value; } ...
php
public static function arrayMultiMergeKeys() { $args = func_get_args(); $result = array (); foreach ($args as $array) { foreach ($array as $key => $row) { foreach ($row as $name => $value) { $result[$key][$name] = $value; } ...
[ "public", "static", "function", "arrayMultiMergeKeys", "(", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "$", "result", "=", "array", "(", ")", ";", "foreach", "(", "$", "args", "as", "$", "array", ")", "{", "foreach", "(", "$", "array...
Performs a recursive array_merge. Keys with the same value will be over-written with the later value Given arguments like: $one = ['key' => ['name' => value], 'key2' => ['name2' => value2] ] $two = ['key' => ['name' => value2], 'key4' => ['name4' => value4] ] Transform them into an array like: [key => ['name' => valu...
[ "Performs", "a", "recursive", "array_merge", ".", "Keys", "with", "the", "same", "value", "will", "be", "over", "-", "written", "with", "the", "later", "value" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/utils/ArrayUtils.php#L254-L267
192,530
wb-crowdfusion/crowdfusion
system/core/classes/libraries/utils/ArrayUtils.php
ArrayUtils.arrayKeyAssoc
public static function arrayKeyAssoc($array_map, $value) { if (is_string($value)) { if (($val = array_search($value, $array_map)) === false) throw new Exception('Value string undefined: ' . $value); return $val; } else if (is_int($value)) { if...
php
public static function arrayKeyAssoc($array_map, $value) { if (is_string($value)) { if (($val = array_search($value, $array_map)) === false) throw new Exception('Value string undefined: ' . $value); return $val; } else if (is_int($value)) { if...
[ "public", "static", "function", "arrayKeyAssoc", "(", "$", "array_map", ",", "$", "value", ")", "{", "if", "(", "is_string", "(", "$", "value", ")", ")", "{", "if", "(", "(", "$", "val", "=", "array_search", "(", "$", "value", ",", "$", "array_map", ...
Returns the associated value from the array based on the type of value given @param array $array_map An array of the type [1 => string, int => string] @param string/int $value An integer or string to find the associated value for @return string or int If input was a string, the associated integer, If was int...
[ "Returns", "the", "associated", "value", "from", "the", "array", "based", "on", "the", "type", "of", "value", "given" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/utils/ArrayUtils.php#L278-L292
192,531
wb-crowdfusion/crowdfusion
system/core/classes/libraries/utils/ArrayUtils.php
ArrayUtils.arraySortUsingKeys
public static function arraySortUsingKeys($arrayToSort, $arrayKeysInOrder) { $result = array(); foreach($arrayKeysInOrder as $key) if(array_key_exists($key, $arrayToSort)) $result[] = $arrayToSort[$key]; return $result; }
php
public static function arraySortUsingKeys($arrayToSort, $arrayKeysInOrder) { $result = array(); foreach($arrayKeysInOrder as $key) if(array_key_exists($key, $arrayToSort)) $result[] = $arrayToSort[$key]; return $result; }
[ "public", "static", "function", "arraySortUsingKeys", "(", "$", "arrayToSort", ",", "$", "arrayKeysInOrder", ")", "{", "$", "result", "=", "array", "(", ")", ";", "foreach", "(", "$", "arrayKeysInOrder", "as", "$", "key", ")", "if", "(", "array_key_exists", ...
Sorts an array using another array as a guide for key order @param array $arrayToSort The associative array to sort and return @param array $arrayKeysInOrder An ordered list of keys in {@link $arrayToSort} @return array A sorted array
[ "Sorts", "an", "array", "using", "another", "array", "as", "a", "guide", "for", "key", "order" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/utils/ArrayUtils.php#L302-L310
192,532
geega/php-simple-orm
src/Enum.php
Enum.getList
public static function getList() { $calledClass = get_called_class(); if (!isset(static::$list[$calledClass])) { $refClass = new \ReflectionClass($calledClass); $labels = static::getLabels(); foreach ($refClass->getConstants() as $constName => $constValue) { ...
php
public static function getList() { $calledClass = get_called_class(); if (!isset(static::$list[$calledClass])) { $refClass = new \ReflectionClass($calledClass); $labels = static::getLabels(); foreach ($refClass->getConstants() as $constName => $constValue) { ...
[ "public", "static", "function", "getList", "(", ")", "{", "$", "calledClass", "=", "get_called_class", "(", ")", ";", "if", "(", "!", "isset", "(", "static", "::", "$", "list", "[", "$", "calledClass", "]", ")", ")", "{", "$", "refClass", "=", "new",...
Get list constants @return mixed
[ "Get", "list", "constants" ]
8ef636fd181c16ee3936d630d99e232c53883447
https://github.com/geega/php-simple-orm/blob/8ef636fd181c16ee3936d630d99e232c53883447/src/Enum.php#L23-L39
192,533
agentmedia/phine-core
src/Core/Logic/Module/ModuleBase.php
ModuleBase.ReadTranslations
function ReadTranslations() { $lang = PhpTranslator::Singleton()->GetLanguage(); \RequireOnceIfExists(PathUtil::BundleTranslationsFile($this, $lang)); \RequireOnceIfExists(PathUtil::ModuleTranslationsFile($this, $lang)); }
php
function ReadTranslations() { $lang = PhpTranslator::Singleton()->GetLanguage(); \RequireOnceIfExists(PathUtil::BundleTranslationsFile($this, $lang)); \RequireOnceIfExists(PathUtil::ModuleTranslationsFile($this, $lang)); }
[ "function", "ReadTranslations", "(", ")", "{", "$", "lang", "=", "PhpTranslator", "::", "Singleton", "(", ")", "->", "GetLanguage", "(", ")", ";", "\\", "RequireOnceIfExists", "(", "PathUtil", "::", "BundleTranslationsFile", "(", "$", "this", ",", "$", "lang...
Reads the translation files
[ "Reads", "the", "translation", "files" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Module/ModuleBase.php#L24-L29
192,534
agentmedia/phine-core
src/Core/Logic/Module/ModuleBase.php
ModuleBase.MyBundle
static function MyBundle() { $className = \get_class(new static()); $endPos = strpos($className, '\\Modules\\'); $bundleNS = Str::Start($className, $endPos); $startPos = strrpos($bundleNS, '\\'); return Str::Part($bundleNS, $startPos + 1); }
php
static function MyBundle() { $className = \get_class(new static()); $endPos = strpos($className, '\\Modules\\'); $bundleNS = Str::Start($className, $endPos); $startPos = strrpos($bundleNS, '\\'); return Str::Part($bundleNS, $startPos + 1); }
[ "static", "function", "MyBundle", "(", ")", "{", "$", "className", "=", "\\", "get_class", "(", "new", "static", "(", ")", ")", ";", "$", "endPos", "=", "strpos", "(", "$", "className", ",", "'\\\\Modules\\\\'", ")", ";", "$", "bundleNS", "=", "Str", ...
The bundle name @return string
[ "The", "bundle", "name" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Module/ModuleBase.php#L36-L43
192,535
agentmedia/phine-core
src/Core/Logic/Module/ModuleBase.php
ModuleBase.Render
final function Render() { $this->output = ''; $this->ReadTranslations(); if ($this->BeforeInit()) { return $this->output; } if ($this->Init()) { return $this->output; } if ($this->BeforeGather()) { re...
php
final function Render() { $this->output = ''; $this->ReadTranslations(); if ($this->BeforeInit()) { return $this->output; } if ($this->Init()) { return $this->output; } if ($this->BeforeGather()) { re...
[ "final", "function", "Render", "(", ")", "{", "$", "this", "->", "output", "=", "''", ";", "$", "this", "->", "ReadTranslations", "(", ")", ";", "if", "(", "$", "this", "->", "BeforeInit", "(", ")", ")", "{", "return", "$", "this", "->", "output", ...
Gets the desired output @return string Returns the output
[ "Gets", "the", "desired", "output" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Module/ModuleBase.php#L68-L87
192,536
SlabPHP/router
src/Pattern.php
Pattern.constructInternalRegularExpression
private function constructInternalRegularExpression($path, $routePattern) { if (empty($routePattern)) return false; $fullRoute = $path; if (substr($fullRoute, -1) == '/') { $fullRoute = substr($fullRoute, 0, -1); } $fullRoute .= $routePattern; $pattern...
php
private function constructInternalRegularExpression($path, $routePattern) { if (empty($routePattern)) return false; $fullRoute = $path; if (substr($fullRoute, -1) == '/') { $fullRoute = substr($fullRoute, 0, -1); } $fullRoute .= $routePattern; $pattern...
[ "private", "function", "constructInternalRegularExpression", "(", "$", "path", ",", "$", "routePattern", ")", "{", "if", "(", "empty", "(", "$", "routePattern", ")", ")", "return", "false", ";", "$", "fullRoute", "=", "$", "path", ";", "if", "(", "substr",...
Construct the internal pattern to test the urls against @param string $path @param string $routePattern @return boolean @throws \Exception
[ "Construct", "the", "internal", "pattern", "to", "test", "the", "urls", "against" ]
3e95fa07f694c0e2288a9e9a0ca106117f501a6e
https://github.com/SlabPHP/router/blob/3e95fa07f694c0e2288a9e9a0ca106117f501a6e/src/Pattern.php#L98-L189
192,537
apioo/psx-record
src/Record.php
Record.merge
public static function merge(RecordInterface $left, RecordInterface $right) { return Record::fromArray(array_merge($left->getProperties(), $right->getProperties()), $right->getDisplayName()); }
php
public static function merge(RecordInterface $left, RecordInterface $right) { return Record::fromArray(array_merge($left->getProperties(), $right->getProperties()), $right->getDisplayName()); }
[ "public", "static", "function", "merge", "(", "RecordInterface", "$", "left", ",", "RecordInterface", "$", "right", ")", "{", "return", "Record", "::", "fromArray", "(", "array_merge", "(", "$", "left", "->", "getProperties", "(", ")", ",", "$", "right", "...
Merges data from two records into a new record. The right record overwrites values from the left record @param \PSX\Record\RecordInterface $left @param \PSX\Record\RecordInterface $right @return \PSX\Record\RecordInterface @deprecated
[ "Merges", "data", "from", "two", "records", "into", "a", "new", "record", ".", "The", "right", "record", "overwrites", "values", "from", "the", "left", "record" ]
045d1ec323635187467569f7d12973c8718a7871
https://github.com/apioo/psx-record/blob/045d1ec323635187467569f7d12973c8718a7871/src/Record.php#L135-L138
192,538
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Configuration.php
Configuration.addSdkOption
public function addSdkOption($key, $value) { if ($key === 'version' && $value !== self::REQUIRED_DYNAMODB_API_VERSION) { throw ODMException::dynamodbApiInvalidVersion(self::REQUIRED_DYNAMODB_API_VERSION); } $this->sdkOptions[$key] = $value; }
php
public function addSdkOption($key, $value) { if ($key === 'version' && $value !== self::REQUIRED_DYNAMODB_API_VERSION) { throw ODMException::dynamodbApiInvalidVersion(self::REQUIRED_DYNAMODB_API_VERSION); } $this->sdkOptions[$key] = $value; }
[ "public", "function", "addSdkOption", "(", "$", "key", ",", "$", "value", ")", "{", "if", "(", "$", "key", "===", "'version'", "&&", "$", "value", "!==", "self", "::", "REQUIRED_DYNAMODB_API_VERSION", ")", "{", "throw", "ODMException", "::", "dynamodbApiInva...
Set an AWS SDK configuration option. NOTE: This will override any pre-existing setting for the specified key. @param string $key @param mixed $value @throws ODMException
[ "Set", "an", "AWS", "SDK", "configuration", "option", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Configuration.php#L127-L134
192,539
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Configuration.php
Configuration.getPersistentCollectionGenerator
public function getPersistentCollectionGenerator() { if (!isset($this->odmOptions['persistentCollectionGenerator'])) { $this->odmOptions['persistentCollectionGenerator'] = new DefaultPersistentCollectionGenerator( $this->getPersistentCollectionDir(), $this->getPer...
php
public function getPersistentCollectionGenerator() { if (!isset($this->odmOptions['persistentCollectionGenerator'])) { $this->odmOptions['persistentCollectionGenerator'] = new DefaultPersistentCollectionGenerator( $this->getPersistentCollectionDir(), $this->getPer...
[ "public", "function", "getPersistentCollectionGenerator", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "odmOptions", "[", "'persistentCollectionGenerator'", "]", ")", ")", "{", "$", "this", "->", "odmOptions", "[", "'persistentCollectionGenerato...
Get the persistent collection generator. @return DefaultPersistentCollectionGenerator
[ "Get", "the", "persistent", "collection", "generator", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Configuration.php#L327-L337
192,540
wb-crowdfusion/crowdfusion
system/core/classes/systemdb/version/VersionDAO.php
VersionDAO.insertSystemVersion
public function insertSystemVersion($details = null, $backtrace = null) { if(is_null($this->cfVersion)) return false; $db = $this->getConnection(); $version = $db->insertRecord('sysversion', array( 'CFVersion' => $this->cfVersion, 'CreationDate' => $this...
php
public function insertSystemVersion($details = null, $backtrace = null) { if(is_null($this->cfVersion)) return false; $db = $this->getConnection(); $version = $db->insertRecord('sysversion', array( 'CFVersion' => $this->cfVersion, 'CreationDate' => $this...
[ "public", "function", "insertSystemVersion", "(", "$", "details", "=", "null", ",", "$", "backtrace", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "cfVersion", ")", ")", "return", "false", ";", "$", "db", "=", "$", "this", "->...
Increments the current system version @param string $details A string detailing changes or the reason for the new version @param string $backtrace A backtrace that documents where this call originated from. @return integer The new current version
[ "Increments", "the", "current", "system", "version" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/systemdb/version/VersionDAO.php#L111-L130
192,541
fulgurio/LightCMSBundle
Entity/Page.php
Page.getMetaValue
public function getMetaValue($metaKey) { $metas = $this->getMeta(); foreach ($metas as $meta) { if ($meta->getMetaKey() == $metaKey) { return ($meta->getMetaValue()); } } return ''; }
php
public function getMetaValue($metaKey) { $metas = $this->getMeta(); foreach ($metas as $meta) { if ($meta->getMetaKey() == $metaKey) { return ($meta->getMetaValue()); } } return ''; }
[ "public", "function", "getMetaValue", "(", "$", "metaKey", ")", "{", "$", "metas", "=", "$", "this", "->", "getMeta", "(", ")", ";", "foreach", "(", "$", "metas", "as", "$", "meta", ")", "{", "if", "(", "$", "meta", "->", "getMetaKey", "(", ")", ...
Get meta value of a given meta key @param string $metaKey @return string
[ "Get", "meta", "value", "of", "a", "given", "meta", "key" ]
66319af52b97b6552b7c391ee370538263f42d10
https://github.com/fulgurio/LightCMSBundle/blob/66319af52b97b6552b7c391ee370538263f42d10/Entity/Page.php#L37-L48
192,542
fulgurio/LightCMSBundle
Entity/Page.php
Page.getAvailableMenu
public function getAvailableMenu() { $availableMenus = array(); $menus = $this->getMenu(); if (!$menus) { return (NULL); } foreach ($menus as $menu) { $availableMenus[] = $menu->getLabel(); } return ($availableMenus); ...
php
public function getAvailableMenu() { $availableMenus = array(); $menus = $this->getMenu(); if (!$menus) { return (NULL); } foreach ($menus as $menu) { $availableMenus[] = $menu->getLabel(); } return ($availableMenus); ...
[ "public", "function", "getAvailableMenu", "(", ")", "{", "$", "availableMenus", "=", "array", "(", ")", ";", "$", "menus", "=", "$", "this", "->", "getMenu", "(", ")", ";", "if", "(", "!", "$", "menus", ")", "{", "return", "(", "NULL", ")", ";", ...
Get available menu @return NULL|multitype:string
[ "Get", "available", "menu" ]
66319af52b97b6552b7c391ee370538263f42d10
https://github.com/fulgurio/LightCMSBundle/blob/66319af52b97b6552b7c391ee370538263f42d10/Entity/Page.php#L75-L88
192,543
RudyMas/html5
src/HTML5/Menu.php
Menu.getURL
private function getURL($array, $key) { $countArray = $this->array_depth($array) - 1; switch ($countArray) { case 1: $url = $array['geen']['url']; $id = $array['geen']['id']; $class = $array['geen']['class']; $attrib = $arra...
php
private function getURL($array, $key) { $countArray = $this->array_depth($array) - 1; switch ($countArray) { case 1: $url = $array['geen']['url']; $id = $array['geen']['id']; $class = $array['geen']['class']; $attrib = $arra...
[ "private", "function", "getURL", "(", "$", "array", ",", "$", "key", ")", "{", "$", "countArray", "=", "$", "this", "->", "array_depth", "(", "$", "array", ")", "-", "1", ";", "switch", "(", "$", "countArray", ")", "{", "case", "1", ":", "$", "ur...
Private function to get the URL linked with the menu item @param array $array @param string $key @return array
[ "Private", "function", "to", "get", "the", "URL", "linked", "with", "the", "menu", "item" ]
0132501ee60510d48d6640c1d0e4244a3b996aa3
https://github.com/RudyMas/html5/blob/0132501ee60510d48d6640c1d0e4244a3b996aa3/src/HTML5/Menu.php#L125-L160
192,544
RudyMas/html5
src/HTML5/Menu.php
Menu.createMenu
public function createMenu($idNav = '', $classNav = '', $attributesNav = '', $idList = '', $classList = '', $attributesList = '') { $this->openNav($idNav, $classNav, $attributesNav); $this->createList('', $idList, $classList, $attributesList); $this->closeNav(); return $this->output;...
php
public function createMenu($idNav = '', $classNav = '', $attributesNav = '', $idList = '', $classList = '', $attributesList = '') { $this->openNav($idNav, $classNav, $attributesNav); $this->createList('', $idList, $classList, $attributesList); $this->closeNav(); return $this->output;...
[ "public", "function", "createMenu", "(", "$", "idNav", "=", "''", ",", "$", "classNav", "=", "''", ",", "$", "attributesNav", "=", "''", ",", "$", "idList", "=", "''", ",", "$", "classList", "=", "''", ",", "$", "attributesList", "=", "''", ")", "{...
To return the created menu @param string $idNav @param string $classNav @param string|array $attributesNav @param string $idList @param string $classList @param string|array $attributesList @return
[ "To", "return", "the", "created", "menu" ]
0132501ee60510d48d6640c1d0e4244a3b996aa3
https://github.com/RudyMas/html5/blob/0132501ee60510d48d6640c1d0e4244a3b996aa3/src/HTML5/Menu.php#L173-L179
192,545
RudyMas/html5
src/HTML5/Menu.php
Menu.addMenu
public function addMenu($url, $id, $class, $attributes, $menu1, $menu2 = 'geen', $menu3 = 'geen', $menu4 = 'geen', $menu5 = 'geen', $menu6 = 'geen') { $this->dataMenu[$menu1][$menu2][$menu3][$menu4][$menu5][$menu6]['url'] = $url; $this->dataMenu[$menu1][$menu2][$menu3][$menu4][$menu5][$menu6]['id'] ...
php
public function addMenu($url, $id, $class, $attributes, $menu1, $menu2 = 'geen', $menu3 = 'geen', $menu4 = 'geen', $menu5 = 'geen', $menu6 = 'geen') { $this->dataMenu[$menu1][$menu2][$menu3][$menu4][$menu5][$menu6]['url'] = $url; $this->dataMenu[$menu1][$menu2][$menu3][$menu4][$menu5][$menu6]['id'] ...
[ "public", "function", "addMenu", "(", "$", "url", ",", "$", "id", ",", "$", "class", ",", "$", "attributes", ",", "$", "menu1", ",", "$", "menu2", "=", "'geen'", ",", "$", "menu3", "=", "'geen'", ",", "$", "menu4", "=", "'geen'", ",", "$", "menu5...
Adding a menu item @param string $url @param string $id @param string $class @param string|array $attributes @param string $menu1 @param string $menu2 @param string $menu3 @param string $menu4 @param string $menu5 @param string $menu6
[ "Adding", "a", "menu", "item" ]
0132501ee60510d48d6640c1d0e4244a3b996aa3
https://github.com/RudyMas/html5/blob/0132501ee60510d48d6640c1d0e4244a3b996aa3/src/HTML5/Menu.php#L195-L201
192,546
RudyMas/html5
src/HTML5/Menu.php
Menu.array_depth
public function array_depth($array) { $max_depth = 1; foreach ($array as $value) { if (is_array($value)) { $depth = $this->array_depth($value) + 1; if ($depth > $max_depth) { $max_depth = $depth; } } ...
php
public function array_depth($array) { $max_depth = 1; foreach ($array as $value) { if (is_array($value)) { $depth = $this->array_depth($value) + 1; if ($depth > $max_depth) { $max_depth = $depth; } } ...
[ "public", "function", "array_depth", "(", "$", "array", ")", "{", "$", "max_depth", "=", "1", ";", "foreach", "(", "$", "array", "as", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "$", "depth", "=", "$", "this"...
This returns the depth of an array @param array $array @return int
[ "This", "returns", "the", "depth", "of", "an", "array" ]
0132501ee60510d48d6640c1d0e4244a3b996aa3
https://github.com/RudyMas/html5/blob/0132501ee60510d48d6640c1d0e4244a3b996aa3/src/HTML5/Menu.php#L209-L221
192,547
vukbgit/PHPCraft.Subject
src/Subject.php
Subject.injectSubject
public function injectSubject(\PHPCraft\Subject\Subject $subject) { $this->subjects[$subject->name] = $subject; }
php
public function injectSubject(\PHPCraft\Subject\Subject $subject) { $this->subjects[$subject->name] = $subject; }
[ "public", "function", "injectSubject", "(", "\\", "PHPCraft", "\\", "Subject", "\\", "Subject", "$", "subject", ")", "{", "$", "this", "->", "subjects", "[", "$", "subject", "->", "name", "]", "=", "$", "subject", ";", "}" ]
Injects another subject @param \PHPCraft\Subject\Subject $subject
[ "Injects", "another", "subject" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Subject.php#L152-L155
192,548
vukbgit/PHPCraft.Subject
src/Subject.php
Subject.getUsedTraits
protected function getUsedTraits() { $reflection = new \ReflectionClass($this); $properties = $reflection->getProperties(); $traits = []; foreach($properties as $property) { $name = $property->getName(); if(substr($name, 0, 3) == 'has') { $trai...
php
protected function getUsedTraits() { $reflection = new \ReflectionClass($this); $properties = $reflection->getProperties(); $traits = []; foreach($properties as $property) { $name = $property->getName(); if(substr($name, 0, 3) == 'has') { $trai...
[ "protected", "function", "getUsedTraits", "(", ")", "{", "$", "reflection", "=", "new", "\\", "ReflectionClass", "(", "$", "this", ")", ";", "$", "properties", "=", "$", "reflection", "->", "getProperties", "(", ")", ";", "$", "traits", "=", "[", "]", ...
Gets traits used by class @return array of used traits names
[ "Gets", "traits", "used", "by", "class" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Subject.php#L171-L183
192,549
vukbgit/PHPCraft.Subject
src/Subject.php
Subject.checkTraitsDependencies
protected function checkTraitsDependencies() { $traits = $this->getUsedTraits(); $reflection = new \ReflectionClass($this); foreach($traits as $trait) { $methodName = 'setTraitDependencies' . $trait; if($reflection->hasMethod($methodName)) { $this->$me...
php
protected function checkTraitsDependencies() { $traits = $this->getUsedTraits(); $reflection = new \ReflectionClass($this); foreach($traits as $trait) { $methodName = 'setTraitDependencies' . $trait; if($reflection->hasMethod($methodName)) { $this->$me...
[ "protected", "function", "checkTraitsDependencies", "(", ")", "{", "$", "traits", "=", "$", "this", "->", "getUsedTraits", "(", ")", ";", "$", "reflection", "=", "new", "\\", "ReflectionClass", "(", "$", "this", ")", ";", "foreach", "(", "$", "traits", "...
Loads traits dependencies from other traits
[ "Loads", "traits", "dependencies", "from", "other", "traits" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Subject.php#L196-L207
192,550
vukbgit/PHPCraft.Subject
src/Subject.php
Subject.checkTraitDependencies
protected function checkTraitDependencies($traitName) { if(isset($this->traitsDependencies[$traitName])) { $reflection = new \ReflectionClass($this); foreach($this->traitsDependencies[$traitName] as $requiredTrait) { $propertyName = 'has' . $requiredTrait; ...
php
protected function checkTraitDependencies($traitName) { if(isset($this->traitsDependencies[$traitName])) { $reflection = new \ReflectionClass($this); foreach($this->traitsDependencies[$traitName] as $requiredTrait) { $propertyName = 'has' . $requiredTrait; ...
[ "protected", "function", "checkTraitDependencies", "(", "$", "traitName", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "traitsDependencies", "[", "$", "traitName", "]", ")", ")", "{", "$", "reflection", "=", "new", "\\", "ReflectionClass", "(", "$...
Checks whether traits required by another trait are used @param string $traitName @param string $injectedProperty
[ "Checks", "whether", "traits", "required", "by", "another", "trait", "are", "used" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Subject.php#L214-L225
192,551
vukbgit/PHPCraft.Subject
src/Subject.php
Subject.processConfiguration
protected function processConfiguration($configuration) { //locale if(isset($configuration['subjects'][$this->name]['locale']) && $configuration['subjects'][$this->name]['locale']) { $this->loadApplicationTranslations($this->name, $configuration['subjects'][$this->name]['locale']); ...
php
protected function processConfiguration($configuration) { //locale if(isset($configuration['subjects'][$this->name]['locale']) && $configuration['subjects'][$this->name]['locale']) { $this->loadApplicationTranslations($this->name, $configuration['subjects'][$this->name]['locale']); ...
[ "protected", "function", "processConfiguration", "(", "$", "configuration", ")", "{", "//locale", "if", "(", "isset", "(", "$", "configuration", "[", "'subjects'", "]", "[", "$", "this", "->", "name", "]", "[", "'locale'", "]", ")", "&&", "$", "configurati...
Processes configuration, checks for mandatory parameters, extracts found parameters @param array $configuration
[ "Processes", "configuration", "checks", "for", "mandatory", "parameters", "extracts", "found", "parameters" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Subject.php#L291-L308
192,552
vukbgit/PHPCraft.Subject
src/Subject.php
Subject.buildPathToArea
protected function buildPathToArea($language = false) { $path = []; //language if($language) { $path[] = $language; } elseif(isset($this->route['parameters']['language'])) { $path[] = $this->route['parameters']['language']; } //area if(...
php
protected function buildPathToArea($language = false) { $path = []; //language if($language) { $path[] = $language; } elseif(isset($this->route['parameters']['language'])) { $path[] = $this->route['parameters']['language']; } //area if(...
[ "protected", "function", "buildPathToArea", "(", "$", "language", "=", "false", ")", "{", "$", "path", "=", "[", "]", ";", "//language", "if", "(", "$", "language", ")", "{", "$", "path", "[", "]", "=", "$", "language", ";", "}", "elseif", "(", "is...
builds path to area from route @param $language language code to embed into URL when different from currently selected one
[ "builds", "path", "to", "area", "from", "route" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Subject.php#L314-L328
192,553
vukbgit/PHPCraft.Subject
src/Subject.php
Subject.buildPathToSubject
protected function buildPathToSubject($language = false) { //area $path = $this->buildPathToArea($language); //ancestors foreach((array) $this->ancestors as $ancestor => $primaryKeyValues) { $path[] = $ancestor; $path[] = implode('|', array_values($primaryKeyV...
php
protected function buildPathToSubject($language = false) { //area $path = $this->buildPathToArea($language); //ancestors foreach((array) $this->ancestors as $ancestor => $primaryKeyValues) { $path[] = $ancestor; $path[] = implode('|', array_values($primaryKeyV...
[ "protected", "function", "buildPathToSubject", "(", "$", "language", "=", "false", ")", "{", "//area", "$", "path", "=", "$", "this", "->", "buildPathToArea", "(", "$", "language", ")", ";", "//ancestors", "foreach", "(", "(", "array", ")", "$", "this", ...
builds path to subject from route @param $language language code to embed into URL when different from currently selected one
[ "builds", "path", "to", "subject", "from", "route" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Subject.php#L334-L348
192,554
vukbgit/PHPCraft.Subject
src/Subject.php
Subject.buildPathToAncestor
protected function buildPathToAncestor($lastAncestor) { $path = $this->buildPathToArea(); foreach((array) $this->ancestors as $ancestor => $primaryKeyValues) { $path[] = $ancestor; if($ancestor != $lastAncestor) { $path[] = implode('|', array_values($primaryKe...
php
protected function buildPathToAncestor($lastAncestor) { $path = $this->buildPathToArea(); foreach((array) $this->ancestors as $ancestor => $primaryKeyValues) { $path[] = $ancestor; if($ancestor != $lastAncestor) { $path[] = implode('|', array_values($primaryKe...
[ "protected", "function", "buildPathToAncestor", "(", "$", "lastAncestor", ")", "{", "$", "path", "=", "$", "this", "->", "buildPathToArea", "(", ")", ";", "foreach", "(", "(", "array", ")", "$", "this", "->", "ancestors", "as", "$", "ancestor", "=>", "$"...
builds path to an ancestor
[ "builds", "path", "to", "an", "ancestor" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Subject.php#L377-L390
192,555
vukbgit/PHPCraft.Subject
src/Subject.php
Subject.checkTraitsInjections
protected function checkTraitsInjections() { $traits = $this->getUsedTraits(); $reflection = new \ReflectionClass($this); foreach($traits as $trait) { $methodName = 'setTraitInjections' . $trait; if($reflection->hasMethod($methodName)) { $this->$method...
php
protected function checkTraitsInjections() { $traits = $this->getUsedTraits(); $reflection = new \ReflectionClass($this); foreach($traits as $trait) { $methodName = 'setTraitInjections' . $trait; if($reflection->hasMethod($methodName)) { $this->$method...
[ "protected", "function", "checkTraitsInjections", "(", ")", "{", "$", "traits", "=", "$", "this", "->", "getUsedTraits", "(", ")", ";", "$", "reflection", "=", "new", "\\", "ReflectionClass", "(", "$", "this", ")", ";", "foreach", "(", "$", "traits", "as...
Checks that injections needed by traits have been performed
[ "Checks", "that", "injections", "needed", "by", "traits", "have", "been", "performed" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Subject.php#L403-L414
192,556
vukbgit/PHPCraft.Subject
src/Subject.php
Subject.checkTraitInjections
protected function checkTraitInjections($traitName) { if(isset($this->traitsInjections[$traitName])) { $reflection = new \ReflectionClass($this); foreach($this->traitsInjections[$traitName] as $propertyName) { if(!$reflection->hasProperty($propertyName) || !$this->$pr...
php
protected function checkTraitInjections($traitName) { if(isset($this->traitsInjections[$traitName])) { $reflection = new \ReflectionClass($this); foreach($this->traitsInjections[$traitName] as $propertyName) { if(!$reflection->hasProperty($propertyName) || !$this->$pr...
[ "protected", "function", "checkTraitInjections", "(", "$", "traitName", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "traitsInjections", "[", "$", "traitName", "]", ")", ")", "{", "$", "reflection", "=", "new", "\\", "ReflectionClass", "(", "$", ...
Checks whether required objects for a trais have been injected @param string $traitName
[ "Checks", "whether", "required", "objects", "for", "a", "trais", "have", "been", "injected" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Subject.php#L420-L430
192,557
vukbgit/PHPCraft.Subject
src/Subject.php
Subject.traitsInit
protected function traitsInit() { $traits = $this->getUsedTraits(); $reflection = new \ReflectionClass($this); foreach($traits as $trait) { $methodName = 'initTrait' . $trait; if($reflection->hasMethod($methodName)) { $this->$methodName(); ...
php
protected function traitsInit() { $traits = $this->getUsedTraits(); $reflection = new \ReflectionClass($this); foreach($traits as $trait) { $methodName = 'initTrait' . $trait; if($reflection->hasMethod($methodName)) { $this->$methodName(); ...
[ "protected", "function", "traitsInit", "(", ")", "{", "$", "traits", "=", "$", "this", "->", "getUsedTraits", "(", ")", ";", "$", "reflection", "=", "new", "\\", "ReflectionClass", "(", "$", "this", ")", ";", "foreach", "(", "$", "traits", "as", "$", ...
Performs initialization tasks needed by traits calling the optional initTraitTrait-name method
[ "Performs", "initialization", "tasks", "needed", "by", "traits", "calling", "the", "optional", "initTraitTrait", "-", "name", "method" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Subject.php#L435-L445
192,558
vukbgit/PHPCraft.Subject
src/Subject.php
Subject.loadTranslations
public function loadTranslations($key, $pathToIniFile) { $path = $pathToIniFile; if(!is_file($path)) { throw new \InvalidArgumentException(sprintf("Translation file not found into path %s", $path)); } else { $this->translations[$key] = parse_ini_file($path,true); ...
php
public function loadTranslations($key, $pathToIniFile) { $path = $pathToIniFile; if(!is_file($path)) { throw new \InvalidArgumentException(sprintf("Translation file not found into path %s", $path)); } else { $this->translations[$key] = parse_ini_file($path,true); ...
[ "public", "function", "loadTranslations", "(", "$", "key", ",", "$", "pathToIniFile", ")", "{", "$", "path", "=", "$", "pathToIniFile", ";", "if", "(", "!", "is_file", "(", "$", "path", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "("...
adds a translations ini file content to subject translations @param string $key key of translations array to store file content into @param string $pathToIniFile file path from application root @throws InvalidArgumentException if file is not found
[ "adds", "a", "translations", "ini", "file", "content", "to", "subject", "translations" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Subject.php#L453-L461
192,559
vukbgit/PHPCraft.Subject
src/Subject.php
Subject.execAction
public function execAction() { //no action defined if(!$this->action) { throw new \Exception(sprintf('no action defined for subject %s', $this->name)); } //exec method try { $this->checkTraitsInjections(); $this->traitsInit(); $...
php
public function execAction() { //no action defined if(!$this->action) { throw new \Exception(sprintf('no action defined for subject %s', $this->name)); } //exec method try { $this->checkTraitsInjections(); $this->traitsInit(); $...
[ "public", "function", "execAction", "(", ")", "{", "//no action defined", "if", "(", "!", "$", "this", "->", "action", ")", "{", "throw", "new", "\\", "Exception", "(", "sprintf", "(", "'no action defined for subject %s'", ",", "$", "this", "->", "name", ")"...
tries to exec current action @throws Exception if there is no action or method defined
[ "tries", "to", "exec", "current", "action" ]
a43ad7868098ff1e7bda6819547ea64f9a853732
https://github.com/vukbgit/PHPCraft.Subject/blob/a43ad7868098ff1e7bda6819547ea64f9a853732/src/Subject.php#L501-L516
192,560
Facebook-Anonymous-Publisher/wordfilter
src/Replace/Normal.php
Normal.replace
public static function replace(array $words, $replacement, $text) { $replace = (mb_strlen($replacement) > 1) ? $replacement : static::transformReplacement($words, $replacement); return str_replace($words, $replace, $text); }
php
public static function replace(array $words, $replacement, $text) { $replace = (mb_strlen($replacement) > 1) ? $replacement : static::transformReplacement($words, $replacement); return str_replace($words, $replace, $text); }
[ "public", "static", "function", "replace", "(", "array", "$", "words", ",", "$", "replacement", ",", "$", "text", ")", "{", "$", "replace", "=", "(", "mb_strlen", "(", "$", "replacement", ")", ">", "1", ")", "?", "$", "replacement", ":", "static", ":...
Replace the text with replacement according to the given words. @param array $words @param string $replacement @param string $text @return string
[ "Replace", "the", "text", "with", "replacement", "according", "to", "the", "given", "words", "." ]
0a2ce766a509650ac622eeaa809391ebf304885e
https://github.com/Facebook-Anonymous-Publisher/wordfilter/blob/0a2ce766a509650ac622eeaa809391ebf304885e/src/Replace/Normal.php#L16-L23
192,561
Facebook-Anonymous-Publisher/wordfilter
src/Replace/Normal.php
Normal.transformReplacement
protected static function transformReplacement(array $words, $replace) { return array_map(function ($value) use ($replace) { return str_repeat($replace, mb_strlen($value)); }, $words); }
php
protected static function transformReplacement(array $words, $replace) { return array_map(function ($value) use ($replace) { return str_repeat($replace, mb_strlen($value)); }, $words); }
[ "protected", "static", "function", "transformReplacement", "(", "array", "$", "words", ",", "$", "replace", ")", "{", "return", "array_map", "(", "function", "(", "$", "value", ")", "use", "(", "$", "replace", ")", "{", "return", "str_repeat", "(", "$", ...
Get words replacement. @param array $words @param string $replace @return array
[ "Get", "words", "replacement", "." ]
0a2ce766a509650ac622eeaa809391ebf304885e
https://github.com/Facebook-Anonymous-Publisher/wordfilter/blob/0a2ce766a509650ac622eeaa809391ebf304885e/src/Replace/Normal.php#L33-L38
192,562
mrstroz/yii2-wavecms-form
Bootstrap.php
Bootstrap.initNavigation
protected function initNavigation() { Yii::$app->params['nav']['wavecms_form'] = [ 'label' => FontAwesome::icon('paper-plane') . Yii::t('wavecms_form/main', 'Forms'), 'url' => 'javascript: ;', 'options' => [ 'class' => 'drop-down' ], ...
php
protected function initNavigation() { Yii::$app->params['nav']['wavecms_form'] = [ 'label' => FontAwesome::icon('paper-plane') . Yii::t('wavecms_form/main', 'Forms'), 'url' => 'javascript: ;', 'options' => [ 'class' => 'drop-down' ], ...
[ "protected", "function", "initNavigation", "(", ")", "{", "Yii", "::", "$", "app", "->", "params", "[", "'nav'", "]", "[", "'wavecms_form'", "]", "=", "[", "'label'", "=>", "FontAwesome", "::", "icon", "(", "'paper-plane'", ")", ".", "Yii", "::", "t", ...
Init left navigation
[ "Init", "left", "navigation" ]
9ada0dbbe07b2281fb20905f7cfd07e4075bd065
https://github.com/mrstroz/yii2-wavecms-form/blob/9ada0dbbe07b2281fb20905f7cfd07e4075bd065/Bootstrap.php#L123-L148
192,563
nails/module-blog
src/Routes.php
Routes.generate
public static function generate() { $oDb = Factory::service('PDODatabase'); $oSettingsService = Factory::service('AppSetting'); $oModel = Factory::model('Blog', 'nails/module-blog'); $aRoutes = []; $oRows = $oDb->query('SELECT id FROM ' . $oMo...
php
public static function generate() { $oDb = Factory::service('PDODatabase'); $oSettingsService = Factory::service('AppSetting'); $oModel = Factory::model('Blog', 'nails/module-blog'); $aRoutes = []; $oRows = $oDb->query('SELECT id FROM ' . $oMo...
[ "public", "static", "function", "generate", "(", ")", "{", "$", "oDb", "=", "Factory", "::", "service", "(", "'PDODatabase'", ")", ";", "$", "oSettingsService", "=", "Factory", "::", "service", "(", "'AppSetting'", ")", ";", "$", "oModel", "=", "Factory", ...
Returns an array of routes for this module @return array
[ "Returns", "an", "array", "of", "routes", "for", "this", "module" ]
7b369c5209f4343fff7c7e2a22c237d5a95c8c24
https://github.com/nails/module-blog/blob/7b369c5209f4343fff7c7e2a22c237d5a95c8c24/src/Routes.php#L24-L54
192,564
itcreator/custom-cmf
Module/Controller/src/Cmf/Controller/CrudController.php
CrudController.defaultAction
public function defaultAction() { $em = $this->getEntityManager(); $pagerParams = ['itemsCountPerPage' => static::ITEMS_ON_PAGE, 'sort' => Application::getRequest()->getSort(),]; $repository = $em->getRepository($this->entityName); $grid = new \Cmf\Component\Grid([ 'fiel...
php
public function defaultAction() { $em = $this->getEntityManager(); $pagerParams = ['itemsCountPerPage' => static::ITEMS_ON_PAGE, 'sort' => Application::getRequest()->getSort(),]; $repository = $em->getRepository($this->entityName); $grid = new \Cmf\Component\Grid([ 'fiel...
[ "public", "function", "defaultAction", "(", ")", "{", "$", "em", "=", "$", "this", "->", "getEntityManager", "(", ")", ";", "$", "pagerParams", "=", "[", "'itemsCountPerPage'", "=>", "static", "::", "ITEMS_ON_PAGE", ",", "'sort'", "=>", "Application", "::", ...
Default CRUD action. Show list of items.
[ "Default", "CRUD", "action", ".", "Show", "list", "of", "items", "." ]
42fc0535dfa0f641856f06673f6ab596b2020c40
https://github.com/itcreator/custom-cmf/blob/42fc0535dfa0f641856f06673f6ab596b2020c40/Module/Controller/src/Cmf/Controller/CrudController.php#L84-L99
192,565
itcreator/custom-cmf
Module/Controller/src/Cmf/Controller/CrudController.php
CrudController.creationOkAction
public function creationOkAction() { $lng = \Cmf\Language\Factory::get($this); HelperFactory::getMessageBox()->addMessage($lng[self::MSG_CREATION_OK]); return $this->forward('default'); }
php
public function creationOkAction() { $lng = \Cmf\Language\Factory::get($this); HelperFactory::getMessageBox()->addMessage($lng[self::MSG_CREATION_OK]); return $this->forward('default'); }
[ "public", "function", "creationOkAction", "(", ")", "{", "$", "lng", "=", "\\", "Cmf", "\\", "Language", "\\", "Factory", "::", "get", "(", "$", "this", ")", ";", "HelperFactory", "::", "getMessageBox", "(", ")", "->", "addMessage", "(", "$", "lng", "[...
Creation of a new item is successfully @return Forward
[ "Creation", "of", "a", "new", "item", "is", "successfully" ]
42fc0535dfa0f641856f06673f6ab596b2020c40
https://github.com/itcreator/custom-cmf/blob/42fc0535dfa0f641856f06673f6ab596b2020c40/Module/Controller/src/Cmf/Controller/CrudController.php#L359-L366
192,566
itcreator/custom-cmf
Module/Controller/src/Cmf/Controller/CrudController.php
CrudController.editionOkAction
public function editionOkAction() { $lng = \Cmf\Language\Factory::get($this); HelperFactory::getMessageBox()->addSuccessMessage($lng[self::MSG_EDITION_OK]); return $this->forward('default'); }
php
public function editionOkAction() { $lng = \Cmf\Language\Factory::get($this); HelperFactory::getMessageBox()->addSuccessMessage($lng[self::MSG_EDITION_OK]); return $this->forward('default'); }
[ "public", "function", "editionOkAction", "(", ")", "{", "$", "lng", "=", "\\", "Cmf", "\\", "Language", "\\", "Factory", "::", "get", "(", "$", "this", ")", ";", "HelperFactory", "::", "getMessageBox", "(", ")", "->", "addSuccessMessage", "(", "$", "lng"...
Edition of a item is successfully @return Forward
[ "Edition", "of", "a", "item", "is", "successfully" ]
42fc0535dfa0f641856f06673f6ab596b2020c40
https://github.com/itcreator/custom-cmf/blob/42fc0535dfa0f641856f06673f6ab596b2020c40/Module/Controller/src/Cmf/Controller/CrudController.php#L373-L379
192,567
itcreator/custom-cmf
Module/Controller/src/Cmf/Controller/CrudController.php
CrudController.deletingOkAction
public function deletingOkAction() { $lng = \Cmf\Language\Factory::get($this); HelperFactory::getMessageBox()->addMessage($lng[self::MSG_DELETING_OK]); return $this->forward('default'); }
php
public function deletingOkAction() { $lng = \Cmf\Language\Factory::get($this); HelperFactory::getMessageBox()->addMessage($lng[self::MSG_DELETING_OK]); return $this->forward('default'); }
[ "public", "function", "deletingOkAction", "(", ")", "{", "$", "lng", "=", "\\", "Cmf", "\\", "Language", "\\", "Factory", "::", "get", "(", "$", "this", ")", ";", "HelperFactory", "::", "getMessageBox", "(", ")", "->", "addMessage", "(", "$", "lng", "[...
Deleting of a item is successfully
[ "Deleting", "of", "a", "item", "is", "successfully" ]
42fc0535dfa0f641856f06673f6ab596b2020c40
https://github.com/itcreator/custom-cmf/blob/42fc0535dfa0f641856f06673f6ab596b2020c40/Module/Controller/src/Cmf/Controller/CrudController.php#L384-L390
192,568
RudyMas/html5
src/HTML5/Forms.php
Forms.addInput
public function addInput($fieldset, $type, $id = '', $class = '', $attributes = '', $name = '', $value = '', $placeholder = '', $labelText = '', $labelId = '', $labelClass = '', $labelAttributes = '', $div = FALSE, $divId = '', $divClass = '', $divAttributes = '...
php
public function addInput($fieldset, $type, $id = '', $class = '', $attributes = '', $name = '', $value = '', $placeholder = '', $labelText = '', $labelId = '', $labelClass = '', $labelAttributes = '', $div = FALSE, $divId = '', $divClass = '', $divAttributes = '...
[ "public", "function", "addInput", "(", "$", "fieldset", ",", "$", "type", ",", "$", "id", "=", "''", ",", "$", "class", "=", "''", ",", "$", "attributes", "=", "''", ",", "$", "name", "=", "''", ",", "$", "value", "=", "''", ",", "$", "placehol...
With this function you add Input elements to the form @param string $fieldset Specifies the name of the fieldset the input-tag belongs to @param string $type Specifies the type of the input-tag to display @param string $id Specifies the id of the input-tag (= for by the label) @param string $class Specifies the class ...
[ "With", "this", "function", "you", "add", "Input", "elements", "to", "the", "form" ]
0132501ee60510d48d6640c1d0e4244a3b996aa3
https://github.com/RudyMas/html5/blob/0132501ee60510d48d6640c1d0e4244a3b996aa3/src/HTML5/Forms.php#L45-L66
192,569
RudyMas/html5
src/HTML5/Forms.php
Forms.addFieldset
public function addFieldset($name, $legend, $fieldsetId = '', $fieldsetClass = '', $fieldsetAttributes = '', $legendId = '', $legendClass = '', $legendAttributes = '') { $this->fieldsetData[$this->nrFieldset]['name'] = $name; $this->fieldsetData[$this->nrFieldset]['le...
php
public function addFieldset($name, $legend, $fieldsetId = '', $fieldsetClass = '', $fieldsetAttributes = '', $legendId = '', $legendClass = '', $legendAttributes = '') { $this->fieldsetData[$this->nrFieldset]['name'] = $name; $this->fieldsetData[$this->nrFieldset]['le...
[ "public", "function", "addFieldset", "(", "$", "name", ",", "$", "legend", ",", "$", "fieldsetId", "=", "''", ",", "$", "fieldsetClass", "=", "''", ",", "$", "fieldsetAttributes", "=", "''", ",", "$", "legendId", "=", "''", ",", "$", "legendClass", "="...
With this function you add a fieldset to your form @param string $name Specifies a name for the fieldset-tag @param string $legend Specifies the text to show for the legend-tag @param string $fieldsetId Specifies the id of the fieldset-tag @param string $fieldsetClass Specifies the class of the fieldset-tag @param str...
[ "With", "this", "function", "you", "add", "a", "fieldset", "to", "your", "form" ]
0132501ee60510d48d6640c1d0e4244a3b996aa3
https://github.com/RudyMas/html5/blob/0132501ee60510d48d6640c1d0e4244a3b996aa3/src/HTML5/Forms.php#L82-L94
192,570
RudyMas/html5
src/HTML5/Forms.php
Forms.createForm
public function createForm($name, $action = '', $method = 'post', $id = '', $class = '', $attributes = '') { $formOutput = ''; // Processing the input-tags within the fieldsets first foreach ($this->fieldsetData as $fieldData) { $formOutput .= $this->fieldset('open', $fieldData['...
php
public function createForm($name, $action = '', $method = 'post', $id = '', $class = '', $attributes = '') { $formOutput = ''; // Processing the input-tags within the fieldsets first foreach ($this->fieldsetData as $fieldData) { $formOutput .= $this->fieldset('open', $fieldData['...
[ "public", "function", "createForm", "(", "$", "name", ",", "$", "action", "=", "''", ",", "$", "method", "=", "'post'", ",", "$", "id", "=", "''", ",", "$", "class", "=", "''", ",", "$", "attributes", "=", "''", ")", "{", "$", "formOutput", "=", ...
Use this function to create the form from the configured input and fieldset data @param string $name Specifies the name of a form @param string $action Specifies where to send the form-data when a form is submitted @param string $method Specifies the HTTP method to use when sending form-data (Default = post) @param st...
[ "Use", "this", "function", "to", "create", "the", "form", "from", "the", "configured", "input", "and", "fieldset", "data" ]
0132501ee60510d48d6640c1d0e4244a3b996aa3
https://github.com/RudyMas/html5/blob/0132501ee60510d48d6640c1d0e4244a3b996aa3/src/HTML5/Forms.php#L107-L125
192,571
RudyMas/html5
src/HTML5/Forms.php
Forms.fixInputAttributes
private function fixInputAttributes(&$field) { if (is_array($field['attributes'])) { $field['attributes']['placeholder'] = $field['placeholder']; } else { $field['attributes'] .= sprintf(' placeholder="%s"', $field['placeholder']); $field['attributes'] = trim($fie...
php
private function fixInputAttributes(&$field) { if (is_array($field['attributes'])) { $field['attributes']['placeholder'] = $field['placeholder']; } else { $field['attributes'] .= sprintf(' placeholder="%s"', $field['placeholder']); $field['attributes'] = trim($fie...
[ "private", "function", "fixInputAttributes", "(", "&", "$", "field", ")", "{", "if", "(", "is_array", "(", "$", "field", "[", "'attributes'", "]", ")", ")", "{", "$", "field", "[", "'attributes'", "]", "[", "'placeholder'", "]", "=", "$", "field", "[",...
Adds the placeholder to the attributes with string or array detection of attributes @param array $field All the fields for the input creation
[ "Adds", "the", "placeholder", "to", "the", "attributes", "with", "string", "or", "array", "detection", "of", "attributes" ]
0132501ee60510d48d6640c1d0e4244a3b996aa3
https://github.com/RudyMas/html5/blob/0132501ee60510d48d6640c1d0e4244a3b996aa3/src/HTML5/Forms.php#L190-L198
192,572
spoom-php/core
src/extension/Logger.php
Logger.dump
public static function dump( $data, int $deep = 10 ) { if( --$deep < 0 ) return '...'; else if( !Collection::is( $data ) ) return $data; else { // handle custom classes $_data = Collection::copy( $data, false ); if( is_object( $data ) && !( $data instanceof \StdClass ) ) try { if...
php
public static function dump( $data, int $deep = 10 ) { if( --$deep < 0 ) return '...'; else if( !Collection::is( $data ) ) return $data; else { // handle custom classes $_data = Collection::copy( $data, false ); if( is_object( $data ) && !( $data instanceof \StdClass ) ) try { if...
[ "public", "static", "function", "dump", "(", "$", "data", ",", "int", "$", "deep", "=", "10", ")", "{", "if", "(", "--", "$", "deep", "<", "0", ")", "return", "'...'", ";", "else", "if", "(", "!", "Collection", "::", "is", "(", "$", "data", ")"...
Preprocess the data before log it This will convert classes to array of properties with reflection @param mixed $data @param int $deep Max process recursion @return mixed
[ "Preprocess", "the", "data", "before", "log", "it" ]
ea7184213352fa2fad7636927a019e5798734e04
https://github.com/spoom-php/core/blob/ea7184213352fa2fad7636927a019e5798734e04/src/extension/Logger.php#L315-L350
192,573
SlaxWeb/Database
src/BaseModel.php
BaseModel.nestedWhere
public function nestedWhere( string $column, \Closure $nested, string $lOpr = "IN" ): self { $this->qBuilder->nestedWhere($column, $nested, $lOpr, "AND"); return $this; }
php
public function nestedWhere( string $column, \Closure $nested, string $lOpr = "IN" ): self { $this->qBuilder->nestedWhere($column, $nested, $lOpr, "AND"); return $this; }
[ "public", "function", "nestedWhere", "(", "string", "$", "column", ",", "\\", "Closure", "$", "nested", ",", "string", "$", "lOpr", "=", "\"IN\"", ")", ":", "self", "{", "$", "this", "->", "qBuilder", "->", "nestedWhere", "(", "$", "column", ",", "$", ...
Where Nested Select Add a nested select as a value to the where predicate. @param string $column Column name @param \Closure $nested Nested builder @param string $lOpr Logical operator, default string("IN") @return self
[ "Where", "Nested", "Select" ]
75fb701cda426eccb99e7604f6c7ddb0eb81a572
https://github.com/SlaxWeb/Database/blob/75fb701cda426eccb99e7604f6c7ddb0eb81a572/src/BaseModel.php#L454-L461
192,574
SlaxWeb/Database
src/BaseModel.php
BaseModel.join
public function join(string $table, string $type = "INNER JOIN"): self { $this->qBuilder->join($table, $type); return $this; }
php
public function join(string $table, string $type = "INNER JOIN"): self { $this->qBuilder->join($table, $type); return $this; }
[ "public", "function", "join", "(", "string", "$", "table", ",", "string", "$", "type", "=", "\"INNER JOIN\"", ")", ":", "self", "{", "$", "this", "->", "qBuilder", "->", "join", "(", "$", "table", ",", "$", "type", ")", ";", "return", "$", "this", ...
Add table to join Adds a new table to join with the main table to the list of joins. If only a table is added without a condition with the 'joinCond', an exception will be thrown when an attempt to create a query is made. @param string $table Table name to which the join is to be made @param string $type Join type, d...
[ "Add", "table", "to", "join" ]
75fb701cda426eccb99e7604f6c7ddb0eb81a572
https://github.com/SlaxWeb/Database/blob/75fb701cda426eccb99e7604f6c7ddb0eb81a572/src/BaseModel.php#L494-L498
192,575
SlaxWeb/Database
src/BaseModel.php
BaseModel.joinCond
public function joinCond(string $primKey, string $forKey, string $cOpr = "="): self { $this->qBuilder->joinCond($primKey, $forKey, $cOpr, "AND"); return $this; }
php
public function joinCond(string $primKey, string $forKey, string $cOpr = "="): self { $this->qBuilder->joinCond($primKey, $forKey, $cOpr, "AND"); return $this; }
[ "public", "function", "joinCond", "(", "string", "$", "primKey", ",", "string", "$", "forKey", ",", "string", "$", "cOpr", "=", "\"=\"", ")", ":", "self", "{", "$", "this", "->", "qBuilder", "->", "joinCond", "(", "$", "primKey", ",", "$", "forKey", ...
Add join condition Adds a JOIN condition to the last join added. If no join was yet added, an exception is raised. @param string $primKey Key of the main table for the condition @param string $forKey Key of the joining table @param string $cOpr Comparison operator for the two keys @return self
[ "Add", "join", "condition" ]
75fb701cda426eccb99e7604f6c7ddb0eb81a572
https://github.com/SlaxWeb/Database/blob/75fb701cda426eccb99e7604f6c7ddb0eb81a572/src/BaseModel.php#L541-L545
192,576
SlaxWeb/Database
src/BaseModel.php
BaseModel.setSoftDelete
protected function setSoftDelete() { $softDelete = $this->config["database.softDelete"]; $this->softDelete = $softDelete["enabled"] ?? false; $this->delCol = $softDelete["column"] ?? ""; $this->delValType = $softDelete["value"] ?? 0; }
php
protected function setSoftDelete() { $softDelete = $this->config["database.softDelete"]; $this->softDelete = $softDelete["enabled"] ?? false; $this->delCol = $softDelete["column"] ?? ""; $this->delValType = $softDelete["value"] ?? 0; }
[ "protected", "function", "setSoftDelete", "(", ")", "{", "$", "softDelete", "=", "$", "this", "->", "config", "[", "\"database.softDelete\"", "]", ";", "$", "this", "->", "softDelete", "=", "$", "softDelete", "[", "\"enabled\"", "]", "??", "false", ";", "$...
Set soft deletion Sets the soft deletion options to class properties from the configuration. @return void
[ "Set", "soft", "deletion" ]
75fb701cda426eccb99e7604f6c7ddb0eb81a572
https://github.com/SlaxWeb/Database/blob/75fb701cda426eccb99e7604f6c7ddb0eb81a572/src/BaseModel.php#L748-L754
192,577
SlaxWeb/Database
src/BaseModel.php
BaseModel.setTimestampConfig
protected function setTimestampConfig() { $timestamp = $this->config["database.timestamp"]; $this->timestamps = $this->timestamps === null ? ($timestamp["enabled"] ?? false) : $this->timestamps; $this->createdColumn = $this->createdColumn ?: ($timestamp["createdColumn...
php
protected function setTimestampConfig() { $timestamp = $this->config["database.timestamp"]; $this->timestamps = $this->timestamps === null ? ($timestamp["enabled"] ?? false) : $this->timestamps; $this->createdColumn = $this->createdColumn ?: ($timestamp["createdColumn...
[ "protected", "function", "setTimestampConfig", "(", ")", "{", "$", "timestamp", "=", "$", "this", "->", "config", "[", "\"database.timestamp\"", "]", ";", "$", "this", "->", "timestamps", "=", "$", "this", "->", "timestamps", "===", "null", "?", "(", "$", ...
Set Timestamp Config Sets the timestamp configuration to the class properties. Any previously user set values to the configuration properties are not overwritten. @return void
[ "Set", "Timestamp", "Config" ]
75fb701cda426eccb99e7604f6c7ddb0eb81a572
https://github.com/SlaxWeb/Database/blob/75fb701cda426eccb99e7604f6c7ddb0eb81a572/src/BaseModel.php#L764-L773
192,578
rollerworks/search-core
Extension/Core/ChoiceList/Factory/CachingFactoryDecorator.php
CachingFactoryDecorator.generateHash
private static function generateHash($value, string $namespace = ''): string { if (\is_object($value)) { $value = spl_object_hash($value); } elseif (\is_array($value)) { array_walk_recursive($value, function (&$v) { if (\is_object($v)) { $v...
php
private static function generateHash($value, string $namespace = ''): string { if (\is_object($value)) { $value = spl_object_hash($value); } elseif (\is_array($value)) { array_walk_recursive($value, function (&$v) { if (\is_object($v)) { $v...
[ "private", "static", "function", "generateHash", "(", "$", "value", ",", "string", "$", "namespace", "=", "''", ")", ":", "string", "{", "if", "(", "\\", "is_object", "(", "$", "value", ")", ")", "{", "$", "value", "=", "spl_object_hash", "(", "$", "...
Generates a SHA-256 hash for the given value. Optionally, a namespace string can be passed. Calling this method will produce the same values, but different namespaces, will return different hashes. @param mixed $value The value to hash @param string $namespace Optional. The namespace @return string The SHA-256 ...
[ "Generates", "a", "SHA", "-", "256", "hash", "for", "the", "given", "value", "." ]
6b5671b8c4d6298906ded768261b0a59845140fb
https://github.com/rollerworks/search-core/blob/6b5671b8c4d6298906ded768261b0a59845140fb/Extension/Core/ChoiceList/Factory/CachingFactoryDecorator.php#L117-L130
192,579
rollerworks/search-core
Extension/Core/ChoiceList/Factory/CachingFactoryDecorator.php
CachingFactoryDecorator.flatten
private static function flatten(array $array, &$output): void { if (null === $output) { $output = []; } foreach ($array as $key => $value) { if (\is_array($value)) { self::flatten($value, $output); continue; } ...
php
private static function flatten(array $array, &$output): void { if (null === $output) { $output = []; } foreach ($array as $key => $value) { if (\is_array($value)) { self::flatten($value, $output); continue; } ...
[ "private", "static", "function", "flatten", "(", "array", "$", "array", ",", "&", "$", "output", ")", ":", "void", "{", "if", "(", "null", "===", "$", "output", ")", "{", "$", "output", "=", "[", "]", ";", "}", "foreach", "(", "$", "array", "as",...
Flattens an array into the given output variable. @param array $array The array to flatten @param array|null $output The flattened output
[ "Flattens", "an", "array", "into", "the", "given", "output", "variable", "." ]
6b5671b8c4d6298906ded768261b0a59845140fb
https://github.com/rollerworks/search-core/blob/6b5671b8c4d6298906ded768261b0a59845140fb/Extension/Core/ChoiceList/Factory/CachingFactoryDecorator.php#L138-L153
192,580
fulgurio/LightCMSBundle
Repository/PageMenuRepository.php
PageMenuRepository.findPagesOfMenu
public function findPagesOfMenu($menuName, $lang = NULL) { $query = $this->getEntityManager()->createQuery('SELECT p FROM FulgurioLightCMSBundle:Page p JOIN p.menu m WHERE m.label=:menuName ORDER BY m.position'); $query->setParameter('menuName', $menuName); $results = $query->getResult(); ...
php
public function findPagesOfMenu($menuName, $lang = NULL) { $query = $this->getEntityManager()->createQuery('SELECT p FROM FulgurioLightCMSBundle:Page p JOIN p.menu m WHERE m.label=:menuName ORDER BY m.position'); $query->setParameter('menuName', $menuName); $results = $query->getResult(); ...
[ "public", "function", "findPagesOfMenu", "(", "$", "menuName", ",", "$", "lang", "=", "NULL", ")", "{", "$", "query", "=", "$", "this", "->", "getEntityManager", "(", ")", "->", "createQuery", "(", "'SELECT p FROM FulgurioLightCMSBundle:Page p JOIN p.menu m WHERE m....
Get page from a given menu name @param string $menuName @param string $lang @return array @todo : may be if we use a well join for source_id
[ "Get", "page", "from", "a", "given", "menu", "name" ]
66319af52b97b6552b7c391ee370538263f42d10
https://github.com/fulgurio/LightCMSBundle/blob/66319af52b97b6552b7c391ee370538263f42d10/Repository/PageMenuRepository.php#L31-L62
192,581
fulgurio/LightCMSBundle
Repository/PageMenuRepository.php
PageMenuRepository.upMenuPagesPosition
public function upMenuPagesPosition($menuName, $position, $positionLimit = NULL) { if (is_null($positionLimit)) { $query = $this->getEntityManager()->createQuery('UPDATE FulgurioLightCMSBundle:PageMenu m SET m.position=m.position-1 WHERE m.position>=:position AND m.label=:menuName'); ...
php
public function upMenuPagesPosition($menuName, $position, $positionLimit = NULL) { if (is_null($positionLimit)) { $query = $this->getEntityManager()->createQuery('UPDATE FulgurioLightCMSBundle:PageMenu m SET m.position=m.position-1 WHERE m.position>=:position AND m.label=:menuName'); ...
[ "public", "function", "upMenuPagesPosition", "(", "$", "menuName", ",", "$", "position", ",", "$", "positionLimit", "=", "NULL", ")", "{", "if", "(", "is_null", "(", "$", "positionLimit", ")", ")", "{", "$", "query", "=", "$", "this", "->", "getEntityMan...
Up pages menu position @param string $menuName @param number $position @param number $positionLimit
[ "Up", "pages", "menu", "position" ]
66319af52b97b6552b7c391ee370538263f42d10
https://github.com/fulgurio/LightCMSBundle/blob/66319af52b97b6552b7c391ee370538263f42d10/Repository/PageMenuRepository.php#L71-L85
192,582
fulgurio/LightCMSBundle
Repository/PageMenuRepository.php
PageMenuRepository.getLastMenuPosition
public function getLastMenuPosition($menuName) { $query = $this->getEntityManager()->createQuery('SELECT MAX(m.position) FROM FulgurioLightCMSBundle:PageMenu m WHERE m.label=:menuName'); $query->setParameter('menuName', $menuName); return $query->getSingleScalarResult(); }
php
public function getLastMenuPosition($menuName) { $query = $this->getEntityManager()->createQuery('SELECT MAX(m.position) FROM FulgurioLightCMSBundle:PageMenu m WHERE m.label=:menuName'); $query->setParameter('menuName', $menuName); return $query->getSingleScalarResult(); }
[ "public", "function", "getLastMenuPosition", "(", "$", "menuName", ")", "{", "$", "query", "=", "$", "this", "->", "getEntityManager", "(", ")", "->", "createQuery", "(", "'SELECT MAX(m.position) FROM FulgurioLightCMSBundle:PageMenu m WHERE m.label=:menuName'", ")", ";", ...
Get last position in menu @param string $menuName @return number
[ "Get", "last", "position", "in", "menu" ]
66319af52b97b6552b7c391ee370538263f42d10
https://github.com/fulgurio/LightCMSBundle/blob/66319af52b97b6552b7c391ee370538263f42d10/Repository/PageMenuRepository.php#L116-L121
192,583
eureka-framework/component-http
src/Http/Server.php
Server.getBaseUri
public function getBaseUri() { $script = $this->get('script'); $base = str_replace('\\', '/', dirname($script)); if ($base != '/') { $url = strtolower($this->get('scheme')) . $this->get('name') . $base; } else { $url = strtolower($this->get('scheme')) . $th...
php
public function getBaseUri() { $script = $this->get('script'); $base = str_replace('\\', '/', dirname($script)); if ($base != '/') { $url = strtolower($this->get('scheme')) . $this->get('name') . $base; } else { $url = strtolower($this->get('scheme')) . $th...
[ "public", "function", "getBaseUri", "(", ")", "{", "$", "script", "=", "$", "this", "->", "get", "(", "'script'", ")", ";", "$", "base", "=", "str_replace", "(", "'\\\\'", ",", "'/'", ",", "dirname", "(", "$", "script", ")", ")", ";", "if", "(", ...
Get current base Uri @return string Current base uri.
[ "Get", "current", "base", "Uri" ]
698c3b73581a9703a9c932890c57e50f8774607a
https://github.com/eureka-framework/component-http/blob/698c3b73581a9703a9c932890c57e50f8774607a/src/Http/Server.php#L39-L51
192,584
eureka-framework/component-http
src/Http/Server.php
Server.getCurrentUri
public function getCurrentUri($absolute = true) { if ($absolute) { return $this->get('scheme') . $this->get('name') . $this->get('uri'); } else { return $this->get('uri'); } }
php
public function getCurrentUri($absolute = true) { if ($absolute) { return $this->get('scheme') . $this->get('name') . $this->get('uri'); } else { return $this->get('uri'); } }
[ "public", "function", "getCurrentUri", "(", "$", "absolute", "=", "true", ")", "{", "if", "(", "$", "absolute", ")", "{", "return", "$", "this", "->", "get", "(", "'scheme'", ")", ".", "$", "this", "->", "get", "(", "'name'", ")", ".", "$", "this",...
Get current uri. @param bool $absolute @return string
[ "Get", "current", "uri", "." ]
698c3b73581a9703a9c932890c57e50f8774607a
https://github.com/eureka-framework/component-http/blob/698c3b73581a9703a9c932890c57e50f8774607a/src/Http/Server.php#L59-L66
192,585
eureka-framework/component-http
src/Http/Server.php
Server.init
public function init() { $this->data['host'] = (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''); $this->data['script'] = (isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : ''); $this->data['uri'] = (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '')...
php
public function init() { $this->data['host'] = (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''); $this->data['script'] = (isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : ''); $this->data['uri'] = (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '')...
[ "public", "function", "init", "(", ")", "{", "$", "this", "->", "data", "[", "'host'", "]", "=", "(", "isset", "(", "$", "_SERVER", "[", "'HTTP_HOST'", "]", ")", "?", "$", "_SERVER", "[", "'HTTP_HOST'", "]", ":", "''", ")", ";", "$", "this", "->"...
Initialize Request data. @return void
[ "Initialize", "Request", "data", "." ]
698c3b73581a9703a9c932890c57e50f8774607a
https://github.com/eureka-framework/component-http/blob/698c3b73581a9703a9c932890c57e50f8774607a/src/Http/Server.php#L73-L92
192,586
eureka-framework/component-http
src/Http/Server.php
Server.redirect
public function redirect($url, $status = 301) { $status = (int) $status; if (!empty($url)) { header($this->get('protocol') . ' 301 Redirect'); header('Status: ' . $status . ' Redirect'); header('Location: ' . $url); exit(0); } else { ...
php
public function redirect($url, $status = 301) { $status = (int) $status; if (!empty($url)) { header($this->get('protocol') . ' 301 Redirect'); header('Status: ' . $status . ' Redirect'); header('Location: ' . $url); exit(0); } else { ...
[ "public", "function", "redirect", "(", "$", "url", ",", "$", "status", "=", "301", ")", "{", "$", "status", "=", "(", "int", ")", "$", "status", ";", "if", "(", "!", "empty", "(", "$", "url", ")", ")", "{", "header", "(", "$", "this", "->", "...
Redirect on specified url. @param string $url @param int $status @return void @throws \Exception
[ "Redirect", "on", "specified", "url", "." ]
698c3b73581a9703a9c932890c57e50f8774607a
https://github.com/eureka-framework/component-http/blob/698c3b73581a9703a9c932890c57e50f8774607a/src/Http/Server.php#L132-L145
192,587
donbidon/lib-fs
src/Tools.php
Tools.walkDir
public static function walkDir(string $path, callable $callback): void { $realPath = realpath($path); if (!is_string($realPath) || !is_dir($realPath)) { throw new InvalidArgumentException(sprintf( "Passed path \"%s\" (%s) isn't a directory", $path, ...
php
public static function walkDir(string $path, callable $callback): void { $realPath = realpath($path); if (!is_string($realPath) || !is_dir($realPath)) { throw new InvalidArgumentException(sprintf( "Passed path \"%s\" (%s) isn't a directory", $path, ...
[ "public", "static", "function", "walkDir", "(", "string", "$", "path", ",", "callable", "$", "callback", ")", ":", "void", "{", "$", "realPath", "=", "realpath", "(", "$", "path", ")", ";", "if", "(", "!", "is_string", "(", "$", "realPath", ")", "||"...
Walks directory recursively. ```php \donbidon\Lib\FileSystem\Tools::walkDir( "/path/to/dir", function (\SplFileInfo $file, $key, array $args): void { // $args["path"] contains passed "/path/to/dir" ($path) echo sprintf( "[%s] %s%s", $file->isDir() ? "DIR " : "file", $file->getRealPath(), PHP_EOL ); } ); ``` @param st...
[ "Walks", "directory", "recursively", "." ]
f0f131f2b0c1c4c7fdf075869242619fe1dcaa51
https://github.com/donbidon/lib-fs/blob/f0f131f2b0c1c4c7fdf075869242619fe1dcaa51/src/Tools.php#L78-L97
192,588
donbidon/lib-fs
src/Tools.php
Tools.removeDir
public static function removeDir(string $path): void { self::walkDir( $path, function (SplFileInfo $file): void { $path = $file->getRealPath(); $file->isDir() ? rmdir($path) : unlink($path); } ); rmdir(...
php
public static function removeDir(string $path): void { self::walkDir( $path, function (SplFileInfo $file): void { $path = $file->getRealPath(); $file->isDir() ? rmdir($path) : unlink($path); } ); rmdir(...
[ "public", "static", "function", "removeDir", "(", "string", "$", "path", ")", ":", "void", "{", "self", "::", "walkDir", "(", "$", "path", ",", "function", "(", "SplFileInfo", "$", "file", ")", ":", "void", "{", "$", "path", "=", "$", "file", "->", ...
Removes directory recursively. Don't forget to call {@see http://php.net/manual/en/function.clearstatcache.php php://clearstatcache()} after using this method if required. @param string $path @return void @see http://php.net/manual/en/function.clearstatcache.php php://clearstatcache()
[ "Removes", "directory", "recursively", "." ]
f0f131f2b0c1c4c7fdf075869242619fe1dcaa51
https://github.com/donbidon/lib-fs/blob/f0f131f2b0c1c4c7fdf075869242619fe1dcaa51/src/Tools.php#L111-L122
192,589
linpax/microphp-framework
src/base/FatalError.php
FatalError.handle
public static function handle($number = 0, $message = '', $file = '', $line = 0, array $context = []) { self::$context = $context; self::$message = $message; self::$number = $number; self::$trace = debug_backtrace(); self::$file = $file; self::$line = $line; ...
php
public static function handle($number = 0, $message = '', $file = '', $line = 0, array $context = []) { self::$context = $context; self::$message = $message; self::$number = $number; self::$trace = debug_backtrace(); self::$file = $file; self::$line = $line; ...
[ "public", "static", "function", "handle", "(", "$", "number", "=", "0", ",", "$", "message", "=", "''", ",", "$", "file", "=", "''", ",", "$", "line", "=", "0", ",", "array", "$", "context", "=", "[", "]", ")", "{", "self", "::", "$", "context"...
Fatal error handle @access public @param int $number @param string $message @param string $file @param int $line @param array $context @return void @static
[ "Fatal", "error", "handle" ]
11f3370f3f64c516cce9b84ecd8276c6e9ae8df9
https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/base/FatalError.php#L60-L77
192,590
Programie/JsonConfig
src/main/php/com/selfcoders/jsonconfig/Config.php
Config.load
public function load($configFile = null) { $this->configData = json_decode(file_get_contents($this->templateFile)); if ($configFile == null) { $configFile = $this->configFile; } if (file_exists($configFile)) { $configData = json_decode(file_get_contents($configFile)); if (!$configData) { ...
php
public function load($configFile = null) { $this->configData = json_decode(file_get_contents($this->templateFile)); if ($configFile == null) { $configFile = $this->configFile; } if (file_exists($configFile)) { $configData = json_decode(file_get_contents($configFile)); if (!$configData) { ...
[ "public", "function", "load", "(", "$", "configFile", "=", "null", ")", "{", "$", "this", "->", "configData", "=", "json_decode", "(", "file_get_contents", "(", "$", "this", "->", "templateFile", ")", ")", ";", "if", "(", "$", "configFile", "==", "null",...
Load or reload the configuration from the specified configuration file and template @param null|string $configFile An optional path to a JSON file which should be loaded instead of the $configFile defined on instance creation @throws JsonException If the configuration file could not be parsed
[ "Load", "or", "reload", "the", "configuration", "from", "the", "specified", "configuration", "file", "and", "template" ]
51314ec4f00fb14c6eb17b36f322b723681a7d36
https://github.com/Programie/JsonConfig/blob/51314ec4f00fb14c6eb17b36f322b723681a7d36/src/main/php/com/selfcoders/jsonconfig/Config.php#L44-L66
192,591
Programie/JsonConfig
src/main/php/com/selfcoders/jsonconfig/Config.php
Config.save
public function save($configFile = null, $jsonOptions = 0, $saveUnset = false) { if ($configFile == null) { $configFile = $this->configFile; } $data = new \StdClass; foreach ($this->configData as $name => $itemData) { if (isset($itemData->value)) { ValueByPath::setValueByPath($data, $name, $...
php
public function save($configFile = null, $jsonOptions = 0, $saveUnset = false) { if ($configFile == null) { $configFile = $this->configFile; } $data = new \StdClass; foreach ($this->configData as $name => $itemData) { if (isset($itemData->value)) { ValueByPath::setValueByPath($data, $name, $...
[ "public", "function", "save", "(", "$", "configFile", "=", "null", ",", "$", "jsonOptions", "=", "0", ",", "$", "saveUnset", "=", "false", ")", "{", "if", "(", "$", "configFile", "==", "null", ")", "{", "$", "configFile", "=", "$", "this", "->", "c...
Save the configuration to the specified configuration file @param null|string $configFile An optional path to a JSON file to which the data should be written instead of the $configFile defined on instance creation @param int $jsonOptions Optional options passed to json_encode (e.g. JSON_PRETTY_PRINT) @param bool $save...
[ "Save", "the", "configuration", "to", "the", "specified", "configuration", "file" ]
51314ec4f00fb14c6eb17b36f322b723681a7d36
https://github.com/Programie/JsonConfig/blob/51314ec4f00fb14c6eb17b36f322b723681a7d36/src/main/php/com/selfcoders/jsonconfig/Config.php#L75-L106
192,592
Programie/JsonConfig
src/main/php/com/selfcoders/jsonconfig/Config.php
Config.hasDefaultValue
public function hasDefaultValue($name) { if (!$this->hasValue($name)) { throw new UnknownConfigValueException($name); } return isset($this->configData->{$name}->defaultValue); }
php
public function hasDefaultValue($name) { if (!$this->hasValue($name)) { throw new UnknownConfigValueException($name); } return isset($this->configData->{$name}->defaultValue); }
[ "public", "function", "hasDefaultValue", "(", "$", "name", ")", "{", "if", "(", "!", "$", "this", "->", "hasValue", "(", "$", "name", ")", ")", "{", "throw", "new", "UnknownConfigValueException", "(", "$", "name", ")", ";", "}", "return", "isset", "(",...
Check whether the given configuration value has a default value. @param string $name The dotted path to the configuration value (e.g. "path.to.the.value") @return bool true if the configuration value has a default value, false otherwise @throws UnknownConfigValueException If the configuration value is not defined in ...
[ "Check", "whether", "the", "given", "configuration", "value", "has", "a", "default", "value", "." ]
51314ec4f00fb14c6eb17b36f322b723681a7d36
https://github.com/Programie/JsonConfig/blob/51314ec4f00fb14c6eb17b36f322b723681a7d36/src/main/php/com/selfcoders/jsonconfig/Config.php#L130-L138
192,593
Programie/JsonConfig
src/main/php/com/selfcoders/jsonconfig/Config.php
Config.getValue
public function getValue($name) { if (!$this->hasValue($name)) { throw new UnknownConfigValueException($name); } $itemData = $this->configData->{$name}; if (isset($itemData->value)) { return $itemData->value; } if (isset($itemData->defaultValue)) { return $itemData->defaultValue; } t...
php
public function getValue($name) { if (!$this->hasValue($name)) { throw new UnknownConfigValueException($name); } $itemData = $this->configData->{$name}; if (isset($itemData->value)) { return $itemData->value; } if (isset($itemData->defaultValue)) { return $itemData->defaultValue; } t...
[ "public", "function", "getValue", "(", "$", "name", ")", "{", "if", "(", "!", "$", "this", "->", "hasValue", "(", "$", "name", ")", ")", "{", "throw", "new", "UnknownConfigValueException", "(", "$", "name", ")", ";", "}", "$", "itemData", "=", "$", ...
Get the value of the given configuration path. @param string $name The dotted path to the configuration value (e.g. "path.to.the.value") @return mixed The value of the configuration value. This can be anything JSON supports (e.g. boolean, integer, string, array or map). @throws UnknownConfigValueException If the con...
[ "Get", "the", "value", "of", "the", "given", "configuration", "path", "." ]
51314ec4f00fb14c6eb17b36f322b723681a7d36
https://github.com/Programie/JsonConfig/blob/51314ec4f00fb14c6eb17b36f322b723681a7d36/src/main/php/com/selfcoders/jsonconfig/Config.php#L168-L188
192,594
Programie/JsonConfig
src/main/php/com/selfcoders/jsonconfig/Config.php
Config.setValue
public function setValue($name, $value) { if (!$this->hasValue($name)) { throw new UnknownConfigValueException($name); } $itemData = $this->configData->{$name}; if ($value === $itemData->defaultValue) { unset($itemData->value); } else { $itemData->value = $value; } }
php
public function setValue($name, $value) { if (!$this->hasValue($name)) { throw new UnknownConfigValueException($name); } $itemData = $this->configData->{$name}; if ($value === $itemData->defaultValue) { unset($itemData->value); } else { $itemData->value = $value; } }
[ "public", "function", "setValue", "(", "$", "name", ",", "$", "value", ")", "{", "if", "(", "!", "$", "this", "->", "hasValue", "(", "$", "name", ")", ")", "{", "throw", "new", "UnknownConfigValueException", "(", "$", "name", ")", ";", "}", "$", "i...
Set the value of the given property path. @param string $name The dotted path to the configuration value (e.g. "path.to.the.value") @param mixed $value The value for the configuration value. This can be anything JSON supports (e.g. boolean, integer, string, array or map) @throws UnknownConfigValueException If the con...
[ "Set", "the", "value", "of", "the", "given", "property", "path", "." ]
51314ec4f00fb14c6eb17b36f322b723681a7d36
https://github.com/Programie/JsonConfig/blob/51314ec4f00fb14c6eb17b36f322b723681a7d36/src/main/php/com/selfcoders/jsonconfig/Config.php#L198-L215
192,595
codeblanche/Entity
src/Entity/Definition/PropertyDefinitionCollection.php
PropertyDefinitionCollection.get
public function get($name) { return isset($this->collection[$name]) ? $this->collection[$name] : null; }
php
public function get($name) { return isset($this->collection[$name]) ? $this->collection[$name] : null; }
[ "public", "function", "get", "(", "$", "name", ")", "{", "return", "isset", "(", "$", "this", "->", "collection", "[", "$", "name", "]", ")", "?", "$", "this", "->", "collection", "[", "$", "name", "]", ":", "null", ";", "}" ]
Retrieve the property definition by name. @param string $name @return PropertyDefnitionInterface
[ "Retrieve", "the", "property", "definition", "by", "name", "." ]
1d3839c09d7639ae8bbfc9d2721223202f3a5cdd
https://github.com/codeblanche/Entity/blob/1d3839c09d7639ae8bbfc9d2721223202f3a5cdd/src/Entity/Definition/PropertyDefinitionCollection.php#L62-L65
192,596
codeblanche/Entity
src/Entity/Definition/PropertyDefinitionCollection.php
PropertyDefinitionCollection.import
public function import($list) { if (!is_array($list) && !($list instanceof Iterator)) { throw new InvalidArgumentException("Expected a list of properties and types"); } foreach ($list as $name => $type) { $this->add($name, $type); } return $this; ...
php
public function import($list) { if (!is_array($list) && !($list instanceof Iterator)) { throw new InvalidArgumentException("Expected a list of properties and types"); } foreach ($list as $name => $type) { $this->add($name, $type); } return $this; ...
[ "public", "function", "import", "(", "$", "list", ")", "{", "if", "(", "!", "is_array", "(", "$", "list", ")", "&&", "!", "(", "$", "list", "instanceof", "Iterator", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Expected a list of prop...
Add a list of properties and types @param array $list key=>type pair list of properties and types. @return PropertyDefinitionCollection @throws InvalidArgumentException
[ "Add", "a", "list", "of", "properties", "and", "types" ]
1d3839c09d7639ae8bbfc9d2721223202f3a5cdd
https://github.com/codeblanche/Entity/blob/1d3839c09d7639ae8bbfc9d2721223202f3a5cdd/src/Entity/Definition/PropertyDefinitionCollection.php#L85-L96
192,597
codeblanche/Entity
src/Entity/Definition/PropertyDefinitionCollection.php
PropertyDefinitionCollection.add
public function add($name, $type) { $property = clone self::$propertyPrototype; $this->collection[$name] = $property->setName($name)->setRawType($type); return $this; }
php
public function add($name, $type) { $property = clone self::$propertyPrototype; $this->collection[$name] = $property->setName($name)->setRawType($type); return $this; }
[ "public", "function", "add", "(", "$", "name", ",", "$", "type", ")", "{", "$", "property", "=", "clone", "self", "::", "$", "propertyPrototype", ";", "$", "this", "->", "collection", "[", "$", "name", "]", "=", "$", "property", "->", "setName", "(",...
Add a single property and type @param string $name @param string $type @return PropertyDefinitionCollection
[ "Add", "a", "single", "property", "and", "type" ]
1d3839c09d7639ae8bbfc9d2721223202f3a5cdd
https://github.com/codeblanche/Entity/blob/1d3839c09d7639ae8bbfc9d2721223202f3a5cdd/src/Entity/Definition/PropertyDefinitionCollection.php#L106-L113
192,598
codeblanche/Entity
src/Entity/Definition/PropertyDefinitionCollection.php
PropertyDefinitionCollection.export
public function export() { $result = array(); foreach ($this->collection as $name => $property) { /* @var $property PropertyDefnitionInterface */ $result[$name] = $property->getRawType(); } return $result; }
php
public function export() { $result = array(); foreach ($this->collection as $name => $property) { /* @var $property PropertyDefnitionInterface */ $result[$name] = $property->getRawType(); } return $result; }
[ "public", "function", "export", "(", ")", "{", "$", "result", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "collection", "as", "$", "name", "=>", "$", "property", ")", "{", "/* @var $property PropertyDefnitionInterface */", "$", "result", ...
Export a list of properties and types @return array
[ "Export", "a", "list", "of", "properties", "and", "types" ]
1d3839c09d7639ae8bbfc9d2721223202f3a5cdd
https://github.com/codeblanche/Entity/blob/1d3839c09d7639ae8bbfc9d2721223202f3a5cdd/src/Entity/Definition/PropertyDefinitionCollection.php#L120-L130
192,599
Linkvalue-Interne/MobileNotif
src/Client/GcmClient.php
GcmClient.setUp
public function setUp(array $params) { if (!isset($params['endpoint'])) { throw new \RuntimeException('Parameter "endpoint" missing.'); } if (!isset($params['api_access_key'])) { throw new \RuntimeException('Parameter "api_access_key" missing.'); } $...
php
public function setUp(array $params) { if (!isset($params['endpoint'])) { throw new \RuntimeException('Parameter "endpoint" missing.'); } if (!isset($params['api_access_key'])) { throw new \RuntimeException('Parameter "api_access_key" missing.'); } $...
[ "public", "function", "setUp", "(", "array", "$", "params", ")", "{", "if", "(", "!", "isset", "(", "$", "params", "[", "'endpoint'", "]", ")", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "'Parameter \"endpoint\" missing.'", ")", ";", "}", "...
Set up the parameters. @param array $params @throws \RuntimeException
[ "Set", "up", "the", "parameters", "." ]
e6e4c4219f3bbb0aee32e90e5fdfc8c6a7ed53f6
https://github.com/Linkvalue-Interne/MobileNotif/blob/e6e4c4219f3bbb0aee32e90e5fdfc8c6a7ed53f6/src/Client/GcmClient.php#L49-L60