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
227,000
whatwedo/TableBundle
Table/Table.php
Table.loadData
public function loadData() { if (!is_callable($this->options['data_loader']) && !is_array($this->options['data_loader'])) { throw new DataLoaderNotAvailableException(); } if ($this->loaded) { return; } $currentPage = 1; $limit = -1; i...
php
public function loadData() { if (!is_callable($this->options['data_loader']) && !is_array($this->options['data_loader'])) { throw new DataLoaderNotAvailableException(); } if ($this->loaded) { return; } $currentPage = 1; $limit = -1; i...
[ "public", "function", "loadData", "(", ")", "{", "if", "(", "!", "is_callable", "(", "$", "this", "->", "options", "[", "'data_loader'", "]", ")", "&&", "!", "is_array", "(", "$", "this", "->", "options", "[", "'data_loader'", "]", ")", ")", "{", "th...
loads the data @throws DataLoaderNotAvailableException
[ "loads", "the", "data" ]
b527b92dc1e59280cdaef4bd6e4722fc6f49359e
https://github.com/whatwedo/TableBundle/blob/b527b92dc1e59280cdaef4bd6e4722fc6f49359e/Table/Table.php#L413-L459
227,001
neoxygen/neo4j-neogen
src/Schema/GraphSchemaBuilder.php
GraphSchemaBuilder.buildGraph
public function buildGraph(array $userSchema) { $graphSchema = new GraphSchema(); foreach ($userSchema['nodes'] as $id => $nodeInfo) { $node = $this->buildNode($id, $nodeInfo); $graphSchema->addNode($node); } if (!isset($userSchema['relationships'])) { ...
php
public function buildGraph(array $userSchema) { $graphSchema = new GraphSchema(); foreach ($userSchema['nodes'] as $id => $nodeInfo) { $node = $this->buildNode($id, $nodeInfo); $graphSchema->addNode($node); } if (!isset($userSchema['relationships'])) { ...
[ "public", "function", "buildGraph", "(", "array", "$", "userSchema", ")", "{", "$", "graphSchema", "=", "new", "GraphSchema", "(", ")", ";", "foreach", "(", "$", "userSchema", "[", "'nodes'", "]", "as", "$", "id", "=>", "$", "nodeInfo", ")", "{", "$", ...
Build a graph definition based on the user parsed schema @param array $userSchema @return \Neoxygen\Neogen\Schema\GraphSchema
[ "Build", "a", "graph", "definition", "based", "on", "the", "user", "parsed", "schema" ]
3bc3ae1b95aae13915ce699b4f2d20762b2f0146
https://github.com/neoxygen/neo4j-neogen/blob/3bc3ae1b95aae13915ce699b4f2d20762b2f0146/src/Schema/GraphSchemaBuilder.php#L21-L37
227,002
neoxygen/neo4j-neogen
src/Schema/GraphSchemaBuilder.php
GraphSchemaBuilder.buildRelationship
public function buildRelationship(array $relInfo) { $relationship = new Relationship($relInfo['start'], $relInfo['end'], $relInfo['type']); $relationship->setCardinality($relInfo['mode']); if (isset($relInfo['properties'])) { foreach ($relInfo['properties'] as $name => $info) { ...
php
public function buildRelationship(array $relInfo) { $relationship = new Relationship($relInfo['start'], $relInfo['end'], $relInfo['type']); $relationship->setCardinality($relInfo['mode']); if (isset($relInfo['properties'])) { foreach ($relInfo['properties'] as $name => $info) { ...
[ "public", "function", "buildRelationship", "(", "array", "$", "relInfo", ")", "{", "$", "relationship", "=", "new", "Relationship", "(", "$", "relInfo", "[", "'start'", "]", ",", "$", "relInfo", "[", "'end'", "]", ",", "$", "relInfo", "[", "'type'", "]",...
Builds the relationship object based on user schema @param array $relInfo relationship info from user schema @return Relationship
[ "Builds", "the", "relationship", "object", "based", "on", "user", "schema" ]
3bc3ae1b95aae13915ce699b4f2d20762b2f0146
https://github.com/neoxygen/neo4j-neogen/blob/3bc3ae1b95aae13915ce699b4f2d20762b2f0146/src/Schema/GraphSchemaBuilder.php#L87-L99
227,003
ARCANEDEV/LaravelAuth
src/Models/Role.php
Role.users
public function users() { return $this ->belongsToMany( config('laravel-auth.users.model', User::class), $this->getPrefix().config('laravel-auth.role-user.table', 'permission_role') ) ->using(Pivots\RoleUser::class) ->withTimest...
php
public function users() { return $this ->belongsToMany( config('laravel-auth.users.model', User::class), $this->getPrefix().config('laravel-auth.role-user.table', 'permission_role') ) ->using(Pivots\RoleUser::class) ->withTimest...
[ "public", "function", "users", "(", ")", "{", "return", "$", "this", "->", "belongsToMany", "(", "config", "(", "'laravel-auth.users.model'", ",", "User", "::", "class", ")", ",", "$", "this", "->", "getPrefix", "(", ")", ".", "config", "(", "'laravel-auth...
Role belongs to many users. @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
[ "Role", "belongs", "to", "many", "users", "." ]
a2719e924c2299f931879139c6cd97642e80acc7
https://github.com/ARCANEDEV/LaravelAuth/blob/a2719e924c2299f931879139c6cd97642e80acc7/src/Models/Role.php#L109-L118
227,004
ARCANEDEV/LaravelAuth
src/Models/Role.php
Role.permissions
public function permissions() { return $this ->belongsToMany( config('laravel-auth.permissions.model', Permission::class), $this->getPrefix().config('laravel-auth.permission-role.table', 'permission_role') ) ->using(Pivots\PermissionRole::c...
php
public function permissions() { return $this ->belongsToMany( config('laravel-auth.permissions.model', Permission::class), $this->getPrefix().config('laravel-auth.permission-role.table', 'permission_role') ) ->using(Pivots\PermissionRole::c...
[ "public", "function", "permissions", "(", ")", "{", "return", "$", "this", "->", "belongsToMany", "(", "config", "(", "'laravel-auth.permissions.model'", ",", "Permission", "::", "class", ")", ",", "$", "this", "->", "getPrefix", "(", ")", ".", "config", "("...
Role belongs to many permissions. @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
[ "Role", "belongs", "to", "many", "permissions", "." ]
a2719e924c2299f931879139c6cd97642e80acc7
https://github.com/ARCANEDEV/LaravelAuth/blob/a2719e924c2299f931879139c6cd97642e80acc7/src/Models/Role.php#L125-L134
227,005
ARCANEDEV/LaravelAuth
src/Models/Role.php
Role.detachUser
public function detachUser($user, $reload = true) { event(new DetachingUserFromRole($this, $user)); $results = $this->users()->detach($user); event(new DetachedUserFromRole($this, $user, $results)); $this->loadUsers($reload); return $results; }
php
public function detachUser($user, $reload = true) { event(new DetachingUserFromRole($this, $user)); $results = $this->users()->detach($user); event(new DetachedUserFromRole($this, $user, $results)); $this->loadUsers($reload); return $results; }
[ "public", "function", "detachUser", "(", "$", "user", ",", "$", "reload", "=", "true", ")", "{", "event", "(", "new", "DetachingUserFromRole", "(", "$", "this", ",", "$", "user", ")", ")", ";", "$", "results", "=", "$", "this", "->", "users", "(", ...
Detach a user from a role. @param \Arcanesoft\Contracts\Auth\Models\User|int $user @param bool $reload @return int
[ "Detach", "a", "user", "from", "a", "role", "." ]
a2719e924c2299f931879139c6cd97642e80acc7
https://github.com/ARCANEDEV/LaravelAuth/blob/a2719e924c2299f931879139c6cd97642e80acc7/src/Models/Role.php#L218-L227
227,006
ARCANEDEV/LaravelAuth
src/Models/Role.php
Role.detachAllUsers
public function detachAllUsers($reload = true) { event(new DetachingAllUsersFromRole($this)); $results = $this->users()->detach(); event(new DetachedAllUsersFromRole($this, $results)); $this->loadUsers($reload); return $results; }
php
public function detachAllUsers($reload = true) { event(new DetachingAllUsersFromRole($this)); $results = $this->users()->detach(); event(new DetachedAllUsersFromRole($this, $results)); $this->loadUsers($reload); return $results; }
[ "public", "function", "detachAllUsers", "(", "$", "reload", "=", "true", ")", "{", "event", "(", "new", "DetachingAllUsersFromRole", "(", "$", "this", ")", ")", ";", "$", "results", "=", "$", "this", "->", "users", "(", ")", "->", "detach", "(", ")", ...
Detach all users from a role. @param bool $reload @return int
[ "Detach", "all", "users", "from", "a", "role", "." ]
a2719e924c2299f931879139c6cd97642e80acc7
https://github.com/ARCANEDEV/LaravelAuth/blob/a2719e924c2299f931879139c6cd97642e80acc7/src/Models/Role.php#L238-L247
227,007
ARCANEDEV/LaravelAuth
src/Models/Role.php
Role.detachPermission
public function detachPermission($permission, $reload = true) { if ( ! $this->hasPermission($permission)) return 0; event(new DetachingPermissionFromRole($this, $permission)); $results = $this->permissions()->detach($permission); event(new DetachedPermissionFromRole($this, $permissi...
php
public function detachPermission($permission, $reload = true) { if ( ! $this->hasPermission($permission)) return 0; event(new DetachingPermissionFromRole($this, $permission)); $results = $this->permissions()->detach($permission); event(new DetachedPermissionFromRole($this, $permissi...
[ "public", "function", "detachPermission", "(", "$", "permission", ",", "$", "reload", "=", "true", ")", "{", "if", "(", "!", "$", "this", "->", "hasPermission", "(", "$", "permission", ")", ")", "return", "0", ";", "event", "(", "new", "DetachingPermissi...
Detach a permission from a role. @param \Arcanesoft\Contracts\Auth\Models\Permission|int $permission @param bool $reload @return int
[ "Detach", "a", "permission", "from", "a", "role", "." ]
a2719e924c2299f931879139c6cd97642e80acc7
https://github.com/ARCANEDEV/LaravelAuth/blob/a2719e924c2299f931879139c6cd97642e80acc7/src/Models/Role.php#L276-L287
227,008
ARCANEDEV/LaravelAuth
src/Models/Role.php
Role.detachAllPermissions
public function detachAllPermissions($reload = true) { if ($this->permissions->isEmpty()) return 0; event(new DetachingAllPermissionsFromRole($this)); $results = $this->permissions()->detach(); event(new DetachedAllPermissionsFromRole($this, $results)); $this->loadPermissio...
php
public function detachAllPermissions($reload = true) { if ($this->permissions->isEmpty()) return 0; event(new DetachingAllPermissionsFromRole($this)); $results = $this->permissions()->detach(); event(new DetachedAllPermissionsFromRole($this, $results)); $this->loadPermissio...
[ "public", "function", "detachAllPermissions", "(", "$", "reload", "=", "true", ")", "{", "if", "(", "$", "this", "->", "permissions", "->", "isEmpty", "(", ")", ")", "return", "0", ";", "event", "(", "new", "DetachingAllPermissionsFromRole", "(", "$", "thi...
Detach all permissions from a role. @param bool $reload @return int
[ "Detach", "all", "permissions", "from", "a", "role", "." ]
a2719e924c2299f931879139c6cd97642e80acc7
https://github.com/ARCANEDEV/LaravelAuth/blob/a2719e924c2299f931879139c6cd97642e80acc7/src/Models/Role.php#L298-L309
227,009
ARCANEDEV/LaravelAuth
src/Models/Role.php
Role.can
public function can($slug) { if ( ! $this->isActive()) return false; return $this->permissions->filter(function (PermissionContract $permission) use ($slug) { return $permission->hasSlug($slug); })->first() !== null; }
php
public function can($slug) { if ( ! $this->isActive()) return false; return $this->permissions->filter(function (PermissionContract $permission) use ($slug) { return $permission->hasSlug($slug); })->first() !== null; }
[ "public", "function", "can", "(", "$", "slug", ")", "{", "if", "(", "!", "$", "this", "->", "isActive", "(", ")", ")", "return", "false", ";", "return", "$", "this", "->", "permissions", "->", "filter", "(", "function", "(", "PermissionContract", "$", ...
Check if role is associated with a permission by slug. @param string $slug @return bool
[ "Check", "if", "role", "is", "associated", "with", "a", "permission", "by", "slug", "." ]
a2719e924c2299f931879139c6cd97642e80acc7
https://github.com/ARCANEDEV/LaravelAuth/blob/a2719e924c2299f931879139c6cd97642e80acc7/src/Models/Role.php#L352-L360
227,010
ARCANEDEV/LaravelAuth
src/Models/Role.php
Role.canAny
public function canAny($permissions, &$failed = null) { $permissions = is_array($permissions) ? collect($permissions) : $permissions; $failed = $permissions->reject(function ($permission) { return $this->can($permission); })->values(); return $permissions->count() !== $...
php
public function canAny($permissions, &$failed = null) { $permissions = is_array($permissions) ? collect($permissions) : $permissions; $failed = $permissions->reject(function ($permission) { return $this->can($permission); })->values(); return $permissions->count() !== $...
[ "public", "function", "canAny", "(", "$", "permissions", ",", "&", "$", "failed", "=", "null", ")", "{", "$", "permissions", "=", "is_array", "(", "$", "permissions", ")", "?", "collect", "(", "$", "permissions", ")", ":", "$", "permissions", ";", "$",...
Check if a role is associated with any of given permissions. @param \Illuminate\Support\Collection|array $permissions @param \Illuminate\Support\Collection &$failed @return bool
[ "Check", "if", "a", "role", "is", "associated", "with", "any", "of", "given", "permissions", "." ]
a2719e924c2299f931879139c6cd97642e80acc7
https://github.com/ARCANEDEV/LaravelAuth/blob/a2719e924c2299f931879139c6cd97642e80acc7/src/Models/Role.php#L370-L379
227,011
ARCANEDEV/LaravelAuth
src/Models/Role.php
Role.canAll
public function canAll($permissions, &$failed = null) { $this->canAny($permissions, $failed); return $failed->isEmpty(); }
php
public function canAll($permissions, &$failed = null) { $this->canAny($permissions, $failed); return $failed->isEmpty(); }
[ "public", "function", "canAll", "(", "$", "permissions", ",", "&", "$", "failed", "=", "null", ")", "{", "$", "this", "->", "canAny", "(", "$", "permissions", ",", "$", "failed", ")", ";", "return", "$", "failed", "->", "isEmpty", "(", ")", ";", "}...
Check if role is associated with all given permissions. @param \Illuminate\Support\Collection|array $permissions @param \Illuminate\Support\Collection &$failed @return bool
[ "Check", "if", "role", "is", "associated", "with", "all", "given", "permissions", "." ]
a2719e924c2299f931879139c6cd97642e80acc7
https://github.com/ARCANEDEV/LaravelAuth/blob/a2719e924c2299f931879139c6cd97642e80acc7/src/Models/Role.php#L389-L394
227,012
javanile/moldable
src/Parser/Mysql/TypeTrait.php
TypeTrait.getNotationType
public function getNotationType( $notation, &$params = null, &$errors = null, $namespace = null ) { $type = gettype($notation); $params = null; switch ($type) { case 'string': return $this->getNotationTypeString($notation, $params,...
php
public function getNotationType( $notation, &$params = null, &$errors = null, $namespace = null ) { $type = gettype($notation); $params = null; switch ($type) { case 'string': return $this->getNotationTypeString($notation, $params,...
[ "public", "function", "getNotationType", "(", "$", "notation", ",", "&", "$", "params", "=", "null", ",", "&", "$", "errors", "=", "null", ",", "$", "namespace", "=", "null", ")", "{", "$", "type", "=", "gettype", "(", "$", "notation", ")", ";", "$...
Get type of a notation. @param type $notation @param type $params @param null|mixed $namespace @return string
[ "Get", "type", "of", "a", "notation", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Parser/Mysql/TypeTrait.php#L23-L48
227,013
BootstrapCMS/Credentials
src/Models/User.php
User.getActivatedAtAccessor
public function getActivatedAtAccessor($value) { if ($value) { return new Carbon($value); } if ($this->getAttribute('activated')) { return $this->getAttribute('created_at'); } return false; }
php
public function getActivatedAtAccessor($value) { if ($value) { return new Carbon($value); } if ($this->getAttribute('activated')) { return $this->getAttribute('created_at'); } return false; }
[ "public", "function", "getActivatedAtAccessor", "(", "$", "value", ")", "{", "if", "(", "$", "value", ")", "{", "return", "new", "Carbon", "(", "$", "value", ")", ";", "}", "if", "(", "$", "this", "->", "getAttribute", "(", "'activated'", ")", ")", "...
Activated at accessor. @param string $value @return \Carbon\Carbon|false
[ "Activated", "at", "accessor", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/Models/User.php#L168-L179
227,014
BootstrapCMS/Credentials
src/Models/User.php
User.hasAccess
public function hasAccess($permissions, $all = true) { $key = sha1(json_encode($permissions).json_encode($all)); if (!array_key_exists($key, $this->access)) { $this->access[$key] = parent::hasAccess($permissions, $all); } return $this->access[$key]; }
php
public function hasAccess($permissions, $all = true) { $key = sha1(json_encode($permissions).json_encode($all)); if (!array_key_exists($key, $this->access)) { $this->access[$key] = parent::hasAccess($permissions, $all); } return $this->access[$key]; }
[ "public", "function", "hasAccess", "(", "$", "permissions", ",", "$", "all", "=", "true", ")", "{", "$", "key", "=", "sha1", "(", "json_encode", "(", "$", "permissions", ")", ".", "json_encode", "(", "$", "all", ")", ")", ";", "if", "(", "!", "arra...
Check a user's access. @param string|string[] $permissions @param bool $all @return bool
[ "Check", "a", "user", "s", "access", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/Models/User.php#L189-L198
227,015
whatwedo/TableBundle
Extension/PaginationExtension.php
PaginationExtension.getCurrentPage
public function getCurrentPage() { $page = $this->getRequest()->query->getInt($this->getActionQueryParameter(static::QUERY_PARAMETER_PAGE), 1); if ($page < 1) { $page = 1; } return $page; }
php
public function getCurrentPage() { $page = $this->getRequest()->query->getInt($this->getActionQueryParameter(static::QUERY_PARAMETER_PAGE), 1); if ($page < 1) { $page = 1; } return $page; }
[ "public", "function", "getCurrentPage", "(", ")", "{", "$", "page", "=", "$", "this", "->", "getRequest", "(", ")", "->", "query", "->", "getInt", "(", "$", "this", "->", "getActionQueryParameter", "(", "static", "::", "QUERY_PARAMETER_PAGE", ")", ",", "1"...
returns current page number. @return int
[ "returns", "current", "page", "number", "." ]
b527b92dc1e59280cdaef4bd6e4722fc6f49359e
https://github.com/whatwedo/TableBundle/blob/b527b92dc1e59280cdaef4bd6e4722fc6f49359e/Extension/PaginationExtension.php#L69-L76
227,016
OpenSkill/Datatable
src/OpenSkill/Datatable/Datatable.php
Datatable.make
public function make(Provider $provider) { $composer = new ColumnComposer($provider, $this->versionEngine, $this->viewFactory, $this->configRepository); return $composer; }
php
public function make(Provider $provider) { $composer = new ColumnComposer($provider, $this->versionEngine, $this->viewFactory, $this->configRepository); return $composer; }
[ "public", "function", "make", "(", "Provider", "$", "provider", ")", "{", "$", "composer", "=", "new", "ColumnComposer", "(", "$", "provider", ",", "$", "this", "->", "versionEngine", ",", "$", "this", "->", "viewFactory", ",", "$", "this", "->", "config...
Will create a new DataComposer with the given provider as implementation. @param Provider $provider The provider for the underlying data. @return ColumnComposer
[ "Will", "create", "a", "new", "DataComposer", "with", "the", "given", "provider", "as", "implementation", "." ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Datatable.php#L54-L58
227,017
javanile/moldable
src/Functions.php
Functions.applyConventions
public static function applyConventions($convention, $string) { // switch ($convention) { case 'camel-case': return Stringy::create($string)->camelize(); case 'upper-camel-case': return Stringy::create($string)->upperCamelize(); cas...
php
public static function applyConventions($convention, $string) { // switch ($convention) { case 'camel-case': return Stringy::create($string)->camelize(); case 'upper-camel-case': return Stringy::create($string)->upperCamelize(); cas...
[ "public", "static", "function", "applyConventions", "(", "$", "convention", ",", "$", "string", ")", "{", "//", "switch", "(", "$", "convention", ")", "{", "case", "'camel-case'", ":", "return", "Stringy", "::", "create", "(", "$", "string", ")", "->", "...
Apply names conventions as camelCase or snake_case. @param mixed $convention @param mixed $string
[ "Apply", "names", "conventions", "as", "camelCase", "or", "snake_case", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Functions.php#L183-L196
227,018
OpenSkill/Datatable
src/OpenSkill/Datatable/Columns/ColumnConfigurationBuilder.php
ColumnConfigurationBuilder.build
public function build() { $this->checkName(); $this->checkCallable(); $this->checkOrderable(); $this->checkSearchable(); return new ColumnConfiguration($this->name, $this->callable, $this->searchable, $this->orderable); }
php
public function build() { $this->checkName(); $this->checkCallable(); $this->checkOrderable(); $this->checkSearchable(); return new ColumnConfiguration($this->name, $this->callable, $this->searchable, $this->orderable); }
[ "public", "function", "build", "(", ")", "{", "$", "this", "->", "checkName", "(", ")", ";", "$", "this", "->", "checkCallable", "(", ")", ";", "$", "this", "->", "checkOrderable", "(", ")", ";", "$", "this", "->", "checkSearchable", "(", ")", ";", ...
Will create the final ColumnConfiguration @return ColumnConfiguration
[ "Will", "create", "the", "final", "ColumnConfiguration" ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Columns/ColumnConfigurationBuilder.php#L99-L107
227,019
OpenSkill/Datatable
src/OpenSkill/Datatable/Columns/ColumnConfigurationBuilder.php
ColumnConfigurationBuilder.checkCallable
private function checkCallable() { if (is_null($this->callable) || !is_callable($this->callable)) { $this->callable = function ($data) { $name = $this->name; if (is_array($data) && array_key_exists($name, $data)) { return $data[$name]; ...
php
private function checkCallable() { if (is_null($this->callable) || !is_callable($this->callable)) { $this->callable = function ($data) { $name = $this->name; if (is_array($data) && array_key_exists($name, $data)) { return $data[$name]; ...
[ "private", "function", "checkCallable", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "callable", ")", "||", "!", "is_callable", "(", "$", "this", "->", "callable", ")", ")", "{", "$", "this", "->", "callable", "=", "function", "(", "$...
Will check if the callable is set and is executable, if not a sensible default will be set.
[ "Will", "check", "if", "the", "callable", "is", "set", "and", "is", "executable", "if", "not", "a", "sensible", "default", "will", "be", "set", "." ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Columns/ColumnConfigurationBuilder.php#L142-L163
227,020
javanile/moldable
src/Database/InsertApi.php
InsertApi.insert
public function insert($model, $values, $map = null) { if (is_string($values)) { $values = [ $values => $map, ]; $map = null; } $this->adapt($model, $this->profile($values)); $fieldsArray = []; $tokensArray = []; $...
php
public function insert($model, $values, $map = null) { if (is_string($values)) { $values = [ $values => $map, ]; $map = null; } $this->adapt($model, $this->profile($values)); $fieldsArray = []; $tokensArray = []; $...
[ "public", "function", "insert", "(", "$", "model", ",", "$", "values", ",", "$", "map", "=", "null", ")", "{", "if", "(", "is_string", "(", "$", "values", ")", ")", "{", "$", "values", "=", "[", "$", "values", "=>", "$", "map", ",", "]", ";", ...
Insert record for specific model with values. @param type $list @param mixed $model @param mixed $values @param null|mixed $map
[ "Insert", "record", "for", "specific", "model", "with", "values", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Database/InsertApi.php#L22-L52
227,021
javanile/moldable
src/Database.php
Database.getDefault
public static function getDefault() { if (static::$_default != null) { return static::$_default; } // check if running into laravel context if (Context::checkLaravel()) { static::$_default = new self(['socket' => 'Laravel']); return static::$_def...
php
public static function getDefault() { if (static::$_default != null) { return static::$_default; } // check if running into laravel context if (Context::checkLaravel()) { static::$_default = new self(['socket' => 'Laravel']); return static::$_def...
[ "public", "static", "function", "getDefault", "(", ")", "{", "if", "(", "static", "::", "$", "_default", "!=", "null", ")", "{", "return", "static", "::", "$", "_default", ";", "}", "// check if running into laravel context", "if", "(", "Context", "::", "che...
Retrieve default SchemaDB connection. @return type
[ "Retrieve", "default", "SchemaDB", "connection", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Database.php#L147-L164
227,022
javanile/moldable
src/Model/FieldApi.php
FieldApi.initSchemaFields
protected function initSchemaFields() { $schema = static::getSchemaFields(); $parser = static::getDatabase()->getParser(); // prepare field values strip schema definitions foreach ($schema as $field) { $this->{$field} = $parser->getNotationValue($this->{$field}); ...
php
protected function initSchemaFields() { $schema = static::getSchemaFields(); $parser = static::getDatabase()->getParser(); // prepare field values strip schema definitions foreach ($schema as $field) { $this->{$field} = $parser->getNotationValue($this->{$field}); ...
[ "protected", "function", "initSchemaFields", "(", ")", "{", "$", "schema", "=", "static", "::", "getSchemaFields", "(", ")", ";", "$", "parser", "=", "static", "::", "getDatabase", "(", ")", "->", "getParser", "(", ")", ";", "// prepare field values strip sche...
Initialize all fields in class.
[ "Initialize", "all", "fields", "in", "class", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Model/FieldApi.php#L17-L26
227,023
javanile/moldable
src/Model/FieldApi.php
FieldApi.fillSchemaFields
public function fillSchemaFields($values, $map = null, $prefix = null) { // if (is_array($map)) { foreach ($map as $alias => $field) { if (isset($values[$alias])) { $values[$field] = $values[$alias]; } } } /...
php
public function fillSchemaFields($values, $map = null, $prefix = null) { // if (is_array($map)) { foreach ($map as $alias => $field) { if (isset($values[$alias])) { $values[$field] = $values[$alias]; } } } /...
[ "public", "function", "fillSchemaFields", "(", "$", "values", ",", "$", "map", "=", "null", ",", "$", "prefix", "=", "null", ")", "{", "//", "if", "(", "is_array", "(", "$", "map", ")", ")", "{", "foreach", "(", "$", "map", "as", "$", "alias", "=...
Fill value inside model fields. @param type $values @param null|mixed $map @param null|mixed $prefix
[ "Fill", "value", "inside", "model", "fields", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Model/FieldApi.php#L35-L79
227,024
javanile/moldable
src/Model/FieldApi.php
FieldApi.getPrimaryKeyValue
public function getPrimaryKeyValue() { // $key = static::getPrimaryKey(); // return $key && isset($this->{$key}) ? $this->{$key} : null; }
php
public function getPrimaryKeyValue() { // $key = static::getPrimaryKey(); // return $key && isset($this->{$key}) ? $this->{$key} : null; }
[ "public", "function", "getPrimaryKeyValue", "(", ")", "{", "//", "$", "key", "=", "static", "::", "getPrimaryKey", "(", ")", ";", "//", "return", "$", "key", "&&", "isset", "(", "$", "this", "->", "{", "$", "key", "}", ")", "?", "$", "this", "->", ...
Get primary key value.
[ "Get", "primary", "key", "value", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Model/FieldApi.php#L111-L121
227,025
javanile/moldable
src/Model/FieldApi.php
FieldApi.getStaticFields
protected static function getStaticFields() { // $attribute = 'StaticFields'; // retrieve value from class setting definition if (!static::hasClassAttribute($attribute)) { $class = static::getClass(); // $reflection = new \ReflectionClass($class)...
php
protected static function getStaticFields() { // $attribute = 'StaticFields'; // retrieve value from class setting definition if (!static::hasClassAttribute($attribute)) { $class = static::getClass(); // $reflection = new \ReflectionClass($class)...
[ "protected", "static", "function", "getStaticFields", "(", ")", "{", "//", "$", "attribute", "=", "'StaticFields'", ";", "// retrieve value from class setting definition", "if", "(", "!", "static", "::", "hasClassAttribute", "(", "$", "attribute", ")", ")", "{", "...
Get all static fields.
[ "Get", "all", "static", "fields", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Model/FieldApi.php#L248-L269
227,026
whatwedo/TableBundle
Factory/TableFactory.php
TableFactory.createTable
public function createTable($identifier, $options = []) { return new Table( $identifier, $options, $this->eventDispatcher, $this->requestStack, $this->templating, $this->formatterManager, $this->extensions ); }
php
public function createTable($identifier, $options = []) { return new Table( $identifier, $options, $this->eventDispatcher, $this->requestStack, $this->templating, $this->formatterManager, $this->extensions ); }
[ "public", "function", "createTable", "(", "$", "identifier", ",", "$", "options", "=", "[", "]", ")", "{", "return", "new", "Table", "(", "$", "identifier", ",", "$", "options", ",", "$", "this", "->", "eventDispatcher", ",", "$", "this", "->", "reques...
returns a new table object @param string $identifier @param array $options @return Table
[ "returns", "a", "new", "table", "object" ]
b527b92dc1e59280cdaef4bd6e4722fc6f49359e
https://github.com/whatwedo/TableBundle/blob/b527b92dc1e59280cdaef4bd6e4722fc6f49359e/Factory/TableFactory.php#L95-L106
227,027
OpenSkill/Datatable
src/OpenSkill/Datatable/Queries/Parser/Datatable110QueryParser.php
Datatable110QueryParser.parse
public function parse(Request $request, array $columnConfiguration) { $query = $request->query; $builder = QueryConfigurationBuilder::create(); $this->getDrawCall($query, $builder); $this->getStart($query, $builder); $this->getLength($query, $builder); $this->getS...
php
public function parse(Request $request, array $columnConfiguration) { $query = $request->query; $builder = QueryConfigurationBuilder::create(); $this->getDrawCall($query, $builder); $this->getStart($query, $builder); $this->getLength($query, $builder); $this->getS...
[ "public", "function", "parse", "(", "Request", "$", "request", ",", "array", "$", "columnConfiguration", ")", "{", "$", "query", "=", "$", "request", "->", "query", ";", "$", "builder", "=", "QueryConfigurationBuilder", "::", "create", "(", ")", ";", "$", ...
Method that should parse the request and return a DTQueryConfiguration @param Request $request The current request that should be investigated @param ColumnConfiguration[] $columnConfiguration The configuration of the columns @return QueryConfiguration the configuration the provider can use to prepare the data
[ "Method", "that", "should", "parse", "the", "request", "and", "return", "a", "DTQueryConfiguration" ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Queries/Parser/Datatable110QueryParser.php#L34-L54
227,028
javanile/moldable
src/Model/RawApi.php
RawApi.raw
public static function raw( $sql, $params = null ) { $results = static::getDatabase()->getResults($sql, $params); return $results; }
php
public static function raw( $sql, $params = null ) { $results = static::getDatabase()->getResults($sql, $params); return $results; }
[ "public", "static", "function", "raw", "(", "$", "sql", ",", "$", "params", "=", "null", ")", "{", "$", "results", "=", "static", "::", "getDatabase", "(", ")", "->", "getResults", "(", "$", "sql", ",", "$", "params", ")", ";", "return", "$", "resu...
Execute a raw query on database. @param type $array @param mixed $sql @param null|mixed $params @param mixed $singleRecord @param mixed $singleValue @param mixed $casting
[ "Execute", "a", "raw", "query", "on", "database", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Model/RawApi.php#L24-L31
227,029
whatwedo/TableBundle
Table/DoctrineTable.php
DoctrineTable.dataLoader
public function dataLoader($page, $limit) { if ($limit > 0) { $this->getQueryBuilder()->setMaxResults($limit); $this->getQueryBuilder()->setFirstResult(($page - 1) * $limit); } $paginator = new Paginator($this->getQueryBuilder()); $tableData = new SimpleTable...
php
public function dataLoader($page, $limit) { if ($limit > 0) { $this->getQueryBuilder()->setMaxResults($limit); $this->getQueryBuilder()->setFirstResult(($page - 1) * $limit); } $paginator = new Paginator($this->getQueryBuilder()); $tableData = new SimpleTable...
[ "public", "function", "dataLoader", "(", "$", "page", ",", "$", "limit", ")", "{", "if", "(", "$", "limit", ">", "0", ")", "{", "$", "this", "->", "getQueryBuilder", "(", ")", "->", "setMaxResults", "(", "$", "limit", ")", ";", "$", "this", "->", ...
Doctrine table data loader @param int $page @param int $limit @return SimpleTableData
[ "Doctrine", "table", "data", "loader" ]
b527b92dc1e59280cdaef4bd6e4722fc6f49359e
https://github.com/whatwedo/TableBundle/blob/b527b92dc1e59280cdaef4bd6e4722fc6f49359e/Table/DoctrineTable.php#L101-L114
227,030
neoxygen/neo4j-neogen
src/Helper/CypherHelper.php
CypherHelper.addNodeLabel
public function addNodeLabel($alias = null, $label) { if (null === $alias) { $alias = str_replace('.','','n'.microtime(true).rand(0,100000000000)); } return $alias.':'.$label.' '; }
php
public function addNodeLabel($alias = null, $label) { if (null === $alias) { $alias = str_replace('.','','n'.microtime(true).rand(0,100000000000)); } return $alias.':'.$label.' '; }
[ "public", "function", "addNodeLabel", "(", "$", "alias", "=", "null", ",", "$", "label", ")", "{", "if", "(", "null", "===", "$", "alias", ")", "{", "$", "alias", "=", "str_replace", "(", "'.'", ",", "''", ",", "'n'", ".", "microtime", "(", "true",...
Add the node alias and the node label @param null $alias @param $label @return string
[ "Add", "the", "node", "alias", "and", "the", "node", "label" ]
3bc3ae1b95aae13915ce699b4f2d20762b2f0146
https://github.com/neoxygen/neo4j-neogen/blob/3bc3ae1b95aae13915ce699b4f2d20762b2f0146/src/Helper/CypherHelper.php#L25-L32
227,031
neoxygen/neo4j-neogen
src/Helper/CypherHelper.php
CypherHelper.addNodeProperty
public function addNodeProperty($key, $value) { if (is_string($value)) { $value = '"'.htmlentities($value, ENT_QUOTES, 'UTF-8').'"'; } elseif (is_int($value)) { $value = 'toInt('.$value.')'; } return $key.':'.$value; }
php
public function addNodeProperty($key, $value) { if (is_string($value)) { $value = '"'.htmlentities($value, ENT_QUOTES, 'UTF-8').'"'; } elseif (is_int($value)) { $value = 'toInt('.$value.')'; } return $key.':'.$value; }
[ "public", "function", "addNodeProperty", "(", "$", "key", ",", "$", "value", ")", "{", "if", "(", "is_string", "(", "$", "value", ")", ")", "{", "$", "value", "=", "'\"'", ".", "htmlentities", "(", "$", "value", ",", "ENT_QUOTES", ",", "'UTF-8'", ")"...
Add a node property key => value, should be used between the "openNodePropertiesBracket" and "closeNodePropertiesBracket" methods @param $key @param $value @return string
[ "Add", "a", "node", "property", "key", "=", ">", "value", "should", "be", "used", "between", "the", "openNodePropertiesBracket", "and", "closeNodePropertiesBracket", "methods" ]
3bc3ae1b95aae13915ce699b4f2d20762b2f0146
https://github.com/neoxygen/neo4j-neogen/blob/3bc3ae1b95aae13915ce699b4f2d20762b2f0146/src/Helper/CypherHelper.php#L72-L81
227,032
neoxygen/neo4j-neogen
src/Helper/CypherHelper.php
CypherHelper.addRelationship
public function addRelationship($start, $end, $type, array $properties = array()) { $sa = 'r'.sha1($start.microtime()); $es = 'r'.sha1($end.microtime()); $q = 'MERGE ('.$sa.' { neogen_id: "'.$start.'" }) '; $q .= 'MERGE ('.$es.' { neogen_id: "'.$end.'" }) '; if (!empty($prop...
php
public function addRelationship($start, $end, $type, array $properties = array()) { $sa = 'r'.sha1($start.microtime()); $es = 'r'.sha1($end.microtime()); $q = 'MERGE ('.$sa.' { neogen_id: "'.$start.'" }) '; $q .= 'MERGE ('.$es.' { neogen_id: "'.$end.'" }) '; if (!empty($prop...
[ "public", "function", "addRelationship", "(", "$", "start", ",", "$", "end", ",", "$", "type", ",", "array", "$", "properties", "=", "array", "(", ")", ")", "{", "$", "sa", "=", "'r'", ".", "sha1", "(", "$", "start", ".", "microtime", "(", ")", "...
Add a relationship path First it try to merge nodes, id's are taken from the already node generated ids Trying to MERGE the nodes could add payload to the query, but as depending of the amount of nodes and relationships creations, the queries may be splitted in multiple statements to avoid dealing with too large bodie...
[ "Add", "a", "relationship", "path", "First", "it", "try", "to", "merge", "nodes", "id", "s", "are", "taken", "from", "the", "already", "node", "generated", "ids" ]
3bc3ae1b95aae13915ce699b4f2d20762b2f0146
https://github.com/neoxygen/neo4j-neogen/blob/3bc3ae1b95aae13915ce699b4f2d20762b2f0146/src/Helper/CypherHelper.php#L98-L139
227,033
neoxygen/neo4j-neogen
src/Schema/Property.php
Property.setProvider
public function setProvider($provider, array $arguments = array()) { if (null === $provider || '' === $provider) { throw new \InvalidArgumentException('A property faker provider name can not be empty'); } $this->provider = $provider; if (!empty($arguments)) { ...
php
public function setProvider($provider, array $arguments = array()) { if (null === $provider || '' === $provider) { throw new \InvalidArgumentException('A property faker provider name can not be empty'); } $this->provider = $provider; if (!empty($arguments)) { ...
[ "public", "function", "setProvider", "(", "$", "provider", ",", "array", "$", "arguments", "=", "array", "(", ")", ")", "{", "if", "(", "null", "===", "$", "provider", "||", "''", "===", "$", "provider", ")", "{", "throw", "new", "\\", "InvalidArgument...
Sets the property faker provider to use @param string $provider The property faker provider @param array $arguments The property faker provider arguments (optional)
[ "Sets", "the", "property", "faker", "provider", "to", "use" ]
3bc3ae1b95aae13915ce699b4f2d20762b2f0146
https://github.com/neoxygen/neo4j-neogen/blob/3bc3ae1b95aae13915ce699b4f2d20762b2f0146/src/Schema/Property.php#L57-L68
227,034
hscstudio/yii2-heart
modules/admin/components/DbManager.php
DbManager.getChildrenRecursive
protected function getChildrenRecursive($name, &$result) { if (isset($this->_children[$name])) { foreach ($this->_children[$name] as $child) { $result[$child] = true; $this->getChildrenRecursive($child, $result); } } }
php
protected function getChildrenRecursive($name, &$result) { if (isset($this->_children[$name])) { foreach ($this->_children[$name] as $child) { $result[$child] = true; $this->getChildrenRecursive($child, $result); } } }
[ "protected", "function", "getChildrenRecursive", "(", "$", "name", ",", "&", "$", "result", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "_children", "[", "$", "name", "]", ")", ")", "{", "foreach", "(", "$", "this", "->", "_children", "[", ...
Recursively finds all children and grand children of the specified item. @param string $name the name of the item whose children are to be looked for. @param array $result the children and grand children (in array keys)
[ "Recursively", "finds", "all", "children", "and", "grand", "children", "of", "the", "specified", "item", "." ]
7c54c7794c5045c0beb1d8bd70b287278eddbeee
https://github.com/hscstudio/yii2-heart/blob/7c54c7794c5045c0beb1d8bd70b287278eddbeee/modules/admin/components/DbManager.php#L471-L479
227,035
javanile/moldable
src/Model/SchemaApi.php
SchemaApi.applySchema
public static function applySchema() { //if (static::isAdamantTable()) { // return; //} $attribute = 'apply-schema'; if (static::hasClassAttribute($attribute)) { return true; } $database = static::getDatabase(); $schema = static::get...
php
public static function applySchema() { //if (static::isAdamantTable()) { // return; //} $attribute = 'apply-schema'; if (static::hasClassAttribute($attribute)) { return true; } $database = static::getDatabase(); $schema = static::get...
[ "public", "static", "function", "applySchema", "(", ")", "{", "//if (static::isAdamantTable()) {", "// return;", "//}", "$", "attribute", "=", "'apply-schema'", ";", "if", "(", "static", "::", "hasClassAttribute", "(", "$", "attribute", ")", ")", "{", "return",...
Apply schema model related. @return type
[ "Apply", "schema", "model", "related", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Model/SchemaApi.php#L22-L49
227,036
javanile/moldable
src/Model/SchemaApi.php
SchemaApi.getDatabase
public static function getDatabase() { $attribute = 'database'; if (!static::hasClassAttribute($attribute)) { $database = Database::getDefault(); if (!$database) { $error = static::error('connection', 'database not found', 'required-for', 6); ...
php
public static function getDatabase() { $attribute = 'database'; if (!static::hasClassAttribute($attribute)) { $database = Database::getDefault(); if (!$database) { $error = static::error('connection', 'database not found', 'required-for', 6); ...
[ "public", "static", "function", "getDatabase", "(", ")", "{", "$", "attribute", "=", "'database'", ";", "if", "(", "!", "static", "::", "hasClassAttribute", "(", "$", "attribute", ")", ")", "{", "$", "database", "=", "Database", "::", "getDefault", "(", ...
Retriece linked database or default. @return type
[ "Retriece", "linked", "database", "or", "default", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Model/SchemaApi.php#L170-L190
227,037
4rthem/graphql-mapper
src/Mapping/MappingNormalizer.php
MappingNormalizer.normalize
public function normalize(SchemaContainer $schemaContainer) { $this->fixNames($schemaContainer); $fields = []; foreach ($schemaContainer->getTypes() as $type) { $fields = array_merge($fields, $type->getFields()); } if (null !== $querySchema = $schemaContainer->...
php
public function normalize(SchemaContainer $schemaContainer) { $this->fixNames($schemaContainer); $fields = []; foreach ($schemaContainer->getTypes() as $type) { $fields = array_merge($fields, $type->getFields()); } if (null !== $querySchema = $schemaContainer->...
[ "public", "function", "normalize", "(", "SchemaContainer", "$", "schemaContainer", ")", "{", "$", "this", "->", "fixNames", "(", "$", "schemaContainer", ")", ";", "$", "fields", "=", "[", "]", ";", "foreach", "(", "$", "schemaContainer", "->", "getTypes", ...
Validates mapping and fixes missing definitions @param SchemaContainer $schemaContainer
[ "Validates", "mapping", "and", "fixes", "missing", "definitions" ]
f2dc8d054e25cd6c53ec8ac6cefc9c4bcf89fcaf
https://github.com/4rthem/graphql-mapper/blob/f2dc8d054e25cd6c53ec8ac6cefc9c4bcf89fcaf/src/Mapping/MappingNormalizer.php#L14-L35
227,038
4rthem/graphql-mapper
src/Mapping/MappingNormalizer.php
MappingNormalizer.mergeResolveConfig
private function mergeResolveConfig(SchemaContainer $schemaContainer, Field $field) { $typeName = TypeParser::getFinalType($field->getType()); if ($schemaContainer->hasType($typeName)) { $typeConfig = $schemaContainer ->getType($typeName) ->getResolveConf...
php
private function mergeResolveConfig(SchemaContainer $schemaContainer, Field $field) { $typeName = TypeParser::getFinalType($field->getType()); if ($schemaContainer->hasType($typeName)) { $typeConfig = $schemaContainer ->getType($typeName) ->getResolveConf...
[ "private", "function", "mergeResolveConfig", "(", "SchemaContainer", "$", "schemaContainer", ",", "Field", "$", "field", ")", "{", "$", "typeName", "=", "TypeParser", "::", "getFinalType", "(", "$", "field", "->", "getType", "(", ")", ")", ";", "if", "(", ...
Apply the resolve config of types that are used by query fields @param SchemaContainer $schemaContainer @param Field $field
[ "Apply", "the", "resolve", "config", "of", "types", "that", "are", "used", "by", "query", "fields" ]
f2dc8d054e25cd6c53ec8ac6cefc9c4bcf89fcaf
https://github.com/4rthem/graphql-mapper/blob/f2dc8d054e25cd6c53ec8ac6cefc9c4bcf89fcaf/src/Mapping/MappingNormalizer.php#L63-L80
227,039
middlewares/geolocation
src/Geolocation.php
Geolocation.getAddress
protected function getAddress(string $ip): Collection { return $this->provider->geocodeQuery(GeocodeQuery::create($ip)); }
php
protected function getAddress(string $ip): Collection { return $this->provider->geocodeQuery(GeocodeQuery::create($ip)); }
[ "protected", "function", "getAddress", "(", "string", "$", "ip", ")", ":", "Collection", "{", "return", "$", "this", "->", "provider", "->", "geocodeQuery", "(", "GeocodeQuery", "::", "create", "(", "$", "ip", ")", ")", ";", "}" ]
Get the address of an ip
[ "Get", "the", "address", "of", "an", "ip" ]
b8aa0af8b85efcab580b16da6a98fbbe70062df9
https://github.com/middlewares/geolocation/blob/b8aa0af8b85efcab580b16da6a98fbbe70062df9/src/Geolocation.php#L77-L80
227,040
middlewares/geolocation
src/Geolocation.php
Geolocation.getIp
private function getIp(ServerRequestInterface $request): string { $server = $request->getServerParams(); if ($this->ipAttribute !== null) { return $request->getAttribute($this->ipAttribute); } return isset($server['REMOTE_ADDR']) ? $server['REMOTE_ADDR'] : ''; }
php
private function getIp(ServerRequestInterface $request): string { $server = $request->getServerParams(); if ($this->ipAttribute !== null) { return $request->getAttribute($this->ipAttribute); } return isset($server['REMOTE_ADDR']) ? $server['REMOTE_ADDR'] : ''; }
[ "private", "function", "getIp", "(", "ServerRequestInterface", "$", "request", ")", ":", "string", "{", "$", "server", "=", "$", "request", "->", "getServerParams", "(", ")", ";", "if", "(", "$", "this", "->", "ipAttribute", "!==", "null", ")", "{", "ret...
Get the client ip.
[ "Get", "the", "client", "ip", "." ]
b8aa0af8b85efcab580b16da6a98fbbe70062df9
https://github.com/middlewares/geolocation/blob/b8aa0af8b85efcab580b16da6a98fbbe70062df9/src/Geolocation.php#L85-L94
227,041
web2all/safebrowsingv4
src/GoogleSafeBrowsing/Example/FileStorage.php
GoogleSafeBrowsing_Example_FileStorage.addHashPrefixes
public function addHashPrefixes($prefixes, $list) { $listdir=$this->getListStorageDir($list); if(!is_dir($listdir)){ mkdir($listdir, 0777, true); } $new_prefixes=array_map('bin2hex',$prefixes); if(is_file($listdir.$this->prefixes_filename)){ $existing_prefixes=explode("\n",file_get_con...
php
public function addHashPrefixes($prefixes, $list) { $listdir=$this->getListStorageDir($list); if(!is_dir($listdir)){ mkdir($listdir, 0777, true); } $new_prefixes=array_map('bin2hex',$prefixes); if(is_file($listdir.$this->prefixes_filename)){ $existing_prefixes=explode("\n",file_get_con...
[ "public", "function", "addHashPrefixes", "(", "$", "prefixes", ",", "$", "list", ")", "{", "$", "listdir", "=", "$", "this", "->", "getListStorageDir", "(", "$", "list", ")", ";", "if", "(", "!", "is_dir", "(", "$", "listdir", ")", ")", "{", "mkdir",...
Adds one or more hashprefixes @param string[] $prefixes @param string $list
[ "Adds", "one", "or", "more", "hashprefixes" ]
e506341efa8d919974c8eb362987bc1e2f398983
https://github.com/web2all/safebrowsingv4/blob/e506341efa8d919974c8eb362987bc1e2f398983/src/GoogleSafeBrowsing/Example/FileStorage.php#L124-L143
227,042
web2all/safebrowsingv4
src/GoogleSafeBrowsing/Example/FileStorage.php
GoogleSafeBrowsing_Example_FileStorage.removeHashPrefixesFromList
public function removeHashPrefixesFromList($list) { $this->debugLog('removeHashPrefixesFromList() list '.$list); $listdir=$this->getListStorageDir($list); if(!$listdir || strlen($listdir)<10){ $this->warningLog('removeHashPrefixesFromList() invalid list directory for list '.$list); return; ...
php
public function removeHashPrefixesFromList($list) { $this->debugLog('removeHashPrefixesFromList() list '.$list); $listdir=$this->getListStorageDir($list); if(!$listdir || strlen($listdir)<10){ $this->warningLog('removeHashPrefixesFromList() invalid list directory for list '.$list); return; ...
[ "public", "function", "removeHashPrefixesFromList", "(", "$", "list", ")", "{", "$", "this", "->", "debugLog", "(", "'removeHashPrefixesFromList() list '", ".", "$", "list", ")", ";", "$", "listdir", "=", "$", "this", "->", "getListStorageDir", "(", "$", "list...
Remove all prefixes of this list @param string $list
[ "Remove", "all", "prefixes", "of", "this", "list" ]
e506341efa8d919974c8eb362987bc1e2f398983
https://github.com/web2all/safebrowsingv4/blob/e506341efa8d919974c8eb362987bc1e2f398983/src/GoogleSafeBrowsing/Example/FileStorage.php#L187-L204
227,043
web2all/safebrowsingv4
src/GoogleSafeBrowsing/Example/FileStorage.php
GoogleSafeBrowsing_Example_FileStorage.setUpdaterState
public function setUpdaterState($timestamp, $errorcount) { $this->debugLog('setUpdaterState() called ('.$timestamp.', '.$errorcount.')'); file_put_contents($this->storage_dir.$this->nextruntime_filename, $timestamp); file_put_contents($this->storage_dir.$this->errorcount_filename, $errorcount); }
php
public function setUpdaterState($timestamp, $errorcount) { $this->debugLog('setUpdaterState() called ('.$timestamp.', '.$errorcount.')'); file_put_contents($this->storage_dir.$this->nextruntime_filename, $timestamp); file_put_contents($this->storage_dir.$this->errorcount_filename, $errorcount); }
[ "public", "function", "setUpdaterState", "(", "$", "timestamp", ",", "$", "errorcount", ")", "{", "$", "this", "->", "debugLog", "(", "'setUpdaterState() called ('", ".", "$", "timestamp", ".", "', '", ".", "$", "errorcount", ".", "')'", ")", ";", "file_put_...
Store the nextrun timestamp and errorcount @param int $timestamp nextrun timestamp @param int $errorcount how many consecutive errors did we have (if any)
[ "Store", "the", "nextrun", "timestamp", "and", "errorcount" ]
e506341efa8d919974c8eb362987bc1e2f398983
https://github.com/web2all/safebrowsingv4/blob/e506341efa8d919974c8eb362987bc1e2f398983/src/GoogleSafeBrowsing/Example/FileStorage.php#L271-L276
227,044
web2all/safebrowsingv4
src/GoogleSafeBrowsing/Example/FileStorage.php
GoogleSafeBrowsing_Example_FileStorage.getNextRunTimestamp
public function getNextRunTimestamp() { if(is_file($this->storage_dir.$this->nextruntime_filename)){ return (int)file_get_contents($this->storage_dir.$this->nextruntime_filename); }else{ return time(); } }
php
public function getNextRunTimestamp() { if(is_file($this->storage_dir.$this->nextruntime_filename)){ return (int)file_get_contents($this->storage_dir.$this->nextruntime_filename); }else{ return time(); } }
[ "public", "function", "getNextRunTimestamp", "(", ")", "{", "if", "(", "is_file", "(", "$", "this", "->", "storage_dir", ".", "$", "this", "->", "nextruntime_filename", ")", ")", "{", "return", "(", "int", ")", "file_get_contents", "(", "$", "this", "->", ...
Retrieve the nextrun timestamp @return int
[ "Retrieve", "the", "nextrun", "timestamp" ]
e506341efa8d919974c8eb362987bc1e2f398983
https://github.com/web2all/safebrowsingv4/blob/e506341efa8d919974c8eb362987bc1e2f398983/src/GoogleSafeBrowsing/Example/FileStorage.php#L283-L290
227,045
web2all/safebrowsingv4
src/GoogleSafeBrowsing/Example/FileStorage.php
GoogleSafeBrowsing_Example_FileStorage.isListedInCache
public function isListedInCache($lookup_hash) { // by default no match in cache $matched_listnames=null; $hex_lookup_hash=bin2hex($lookup_hash); foreach($this->getLists() as $listname => $liststate){ $listdir=$this->getListStorageDir($listname); if(!is_dir($listdir)){ $th...
php
public function isListedInCache($lookup_hash) { // by default no match in cache $matched_listnames=null; $hex_lookup_hash=bin2hex($lookup_hash); foreach($this->getLists() as $listname => $liststate){ $listdir=$this->getListStorageDir($listname); if(!is_dir($listdir)){ $th...
[ "public", "function", "isListedInCache", "(", "$", "lookup_hash", ")", "{", "// by default no match in cache", "$", "matched_listnames", "=", "null", ";", "$", "hex_lookup_hash", "=", "bin2hex", "(", "$", "lookup_hash", ")", ";", "foreach", "(", "$", "this", "->...
Lookup listnames for the given url hash Only do this for hashes for which a prefix was found! @param string $lookup_hash @return string[] list names or null if not cached
[ "Lookup", "listnames", "for", "the", "given", "url", "hash" ]
e506341efa8d919974c8eb362987bc1e2f398983
https://github.com/web2all/safebrowsingv4/blob/e506341efa8d919974c8eb362987bc1e2f398983/src/GoogleSafeBrowsing/Example/FileStorage.php#L509-L576
227,046
javanile/moldable
src/Database/Socket/PdoSocket.php
PdoSocket.connect
private function connect() { $port = isset($this->_args['port']) && $this->_args['port'] ? $this->_args['port'] : 3306; $dsn = "mysql:host={$this->_args['host']};port={$port};dbname={$this->_args['dbname']}"; $username = $this->_args['username']; $password = $this->_args['password'];...
php
private function connect() { $port = isset($this->_args['port']) && $this->_args['port'] ? $this->_args['port'] : 3306; $dsn = "mysql:host={$this->_args['host']};port={$port};dbname={$this->_args['dbname']}"; $username = $this->_args['username']; $password = $this->_args['password'];...
[ "private", "function", "connect", "(", ")", "{", "$", "port", "=", "isset", "(", "$", "this", "->", "_args", "[", "'port'", "]", ")", "&&", "$", "this", "->", "_args", "[", "'port'", "]", "?", "$", "this", "->", "_args", "[", "'port'", "]", ":", ...
Start PDO connection.
[ "Start", "PDO", "connection", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Database/Socket/PdoSocket.php#L81-L109
227,047
javanile/moldable
src/Database/Socket/PdoSocket.php
PdoSocket.getColumn
public function getColumn($sql, $params = null) { $stmt = $this->execute($sql, $params); $column = []; while ($row = $stmt->fetch()) { $column[] = $row[0]; } return $column; }
php
public function getColumn($sql, $params = null) { $stmt = $this->execute($sql, $params); $column = []; while ($row = $stmt->fetch()) { $column[] = $row[0]; } return $column; }
[ "public", "function", "getColumn", "(", "$", "sql", ",", "$", "params", "=", "null", ")", "{", "$", "stmt", "=", "$", "this", "->", "execute", "(", "$", "sql", ",", "$", "params", ")", ";", "$", "column", "=", "[", "]", ";", "while", "(", "$", ...
Get single column elements. @param type $sql @param null|mixed $params @return type
[ "Get", "single", "column", "elements", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Database/Socket/PdoSocket.php#L158-L168
227,048
javanile/moldable
src/Database/Socket/PdoSocket.php
PdoSocket.execute
public function execute($sql, $params = null) { $stmt = $this->_pdo->prepare($sql); if (is_array($params)) { foreach ($params as $token => $value) { $stmt->bindValue($token, $value); } } try { $stmt->execute(); } catch (PD...
php
public function execute($sql, $params = null) { $stmt = $this->_pdo->prepare($sql); if (is_array($params)) { foreach ($params as $token => $value) { $stmt->bindValue($token, $value); } } try { $stmt->execute(); } catch (PD...
[ "public", "function", "execute", "(", "$", "sql", ",", "$", "params", "=", "null", ")", "{", "$", "stmt", "=", "$", "this", "->", "_pdo", "->", "prepare", "(", "$", "sql", ")", ";", "if", "(", "is_array", "(", "$", "params", ")", ")", "{", "for...
Execute a SQL query on DB with binded values. @param mixed $sql @param null|mixed $params
[ "Execute", "a", "SQL", "query", "on", "DB", "with", "binded", "values", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Database/Socket/PdoSocket.php#L257-L274
227,049
OpenSkill/Datatable
src/OpenSkill/Datatable/Providers/QueryBuilderProvider.php
QueryBuilderProvider.getColumnFromName
private function getColumnFromName($name) { foreach ($this->columnConfiguration as $i => $col) { if ($col->getName() == $name) { return $col; } } // This exception should never happen. If it does, something is // wrong w/ the relationship betw...
php
private function getColumnFromName($name) { foreach ($this->columnConfiguration as $i => $col) { if ($col->getName() == $name) { return $col; } } // This exception should never happen. If it does, something is // wrong w/ the relationship betw...
[ "private", "function", "getColumnFromName", "(", "$", "name", ")", "{", "foreach", "(", "$", "this", "->", "columnConfiguration", "as", "$", "i", "=>", "$", "col", ")", "{", "if", "(", "$", "col", "->", "getName", "(", ")", "==", "$", "name", ")", ...
Get the requested column configuration from the name of a column @param string $name @return ColumnConfiguration @throws DatatableException when a column is not found
[ "Get", "the", "requested", "column", "configuration", "from", "the", "name", "of", "a", "column" ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Providers/QueryBuilderProvider.php#L203-L215
227,050
OpenSkill/Datatable
src/OpenSkill/Datatable/Providers/QueryBuilderProvider.php
QueryBuilderProvider.compileColumnNames
private function compileColumnNames() { $columns = []; foreach($this->columnConfiguration as $column) { $columns[] = $column->getName(); } return $columns; }
php
private function compileColumnNames() { $columns = []; foreach($this->columnConfiguration as $column) { $columns[] = $column->getName(); } return $columns; }
[ "private", "function", "compileColumnNames", "(", ")", "{", "$", "columns", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "columnConfiguration", "as", "$", "column", ")", "{", "$", "columns", "[", "]", "=", "$", "column", "->", "getName", "(",...
Get a list of all the column names for the SELECT query.
[ "Get", "a", "list", "of", "all", "the", "column", "names", "for", "the", "SELECT", "query", "." ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Providers/QueryBuilderProvider.php#L220-L228
227,051
OpenSkill/Datatable
src/OpenSkill/Datatable/Providers/QueryBuilderProvider.php
QueryBuilderProvider.sortQuery
private function sortQuery() { if ($this->queryConfiguration->hasOrderColumn()) { $orderColumns = $this->queryConfiguration->orderColumns(); foreach($orderColumns as $order) { $this->query->orderBy($order->columnName(), $order->isDescending() ? 'desc' : 'asc'); ...
php
private function sortQuery() { if ($this->queryConfiguration->hasOrderColumn()) { $orderColumns = $this->queryConfiguration->orderColumns(); foreach($orderColumns as $order) { $this->query->orderBy($order->columnName(), $order->isDescending() ? 'desc' : 'asc'); ...
[ "private", "function", "sortQuery", "(", ")", "{", "if", "(", "$", "this", "->", "queryConfiguration", "->", "hasOrderColumn", "(", ")", ")", "{", "$", "orderColumns", "=", "$", "this", "->", "queryConfiguration", "->", "orderColumns", "(", ")", ";", "fore...
Will sort the query based on the given datatable query configuration.
[ "Will", "sort", "the", "query", "based", "on", "the", "given", "datatable", "query", "configuration", "." ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Providers/QueryBuilderProvider.php#L233-L242
227,052
OpenSkill/Datatable
src/OpenSkill/Datatable/Providers/QueryBuilderProvider.php
QueryBuilderProvider.limitQuery
private function limitQuery() { $this->query->skip($this->queryConfiguration->start()); $this->query->limit($this->queryConfiguration->length()); }
php
private function limitQuery() { $this->query->skip($this->queryConfiguration->start()); $this->query->limit($this->queryConfiguration->length()); }
[ "private", "function", "limitQuery", "(", ")", "{", "$", "this", "->", "query", "->", "skip", "(", "$", "this", "->", "queryConfiguration", "->", "start", "(", ")", ")", ";", "$", "this", "->", "query", "->", "limit", "(", "$", "this", "->", "queryCo...
Will limit a query based on the start and length given
[ "Will", "limit", "a", "query", "based", "on", "the", "start", "and", "length", "given" ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Providers/QueryBuilderProvider.php#L247-L251
227,053
BootstrapCMS/Credentials
src/Presenters/UserPresenter.php
UserPresenter.securityHistory
public function securityHistory() { $history = $this->wrappedObject->security()->get(); $history->each(function ($item) { $item->security = true; }); return $this->presenter->decorate($history); }
php
public function securityHistory() { $history = $this->wrappedObject->security()->get(); $history->each(function ($item) { $item->security = true; }); return $this->presenter->decorate($history); }
[ "public", "function", "securityHistory", "(", ")", "{", "$", "history", "=", "$", "this", "->", "wrappedObject", "->", "security", "(", ")", "->", "get", "(", ")", ";", "$", "history", "->", "each", "(", "function", "(", "$", "item", ")", "{", "$", ...
Get the user's security history. @return \Illuminate\Database\Eloquent\Collection
[ "Get", "the", "user", "s", "security", "history", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/Presenters/UserPresenter.php#L61-L70
227,054
BootstrapCMS/Credentials
src/Http/Controllers/RegistrationController.php
RegistrationController.postRegister
public function postRegister() { if (!Config::get('credentials.regallowed')) { return Redirect::route('account.register'); } $input = Binput::only(['first_name', 'last_name', 'email', 'password', 'password_confirmation']); $val = UserRepository::validate($input, array_k...
php
public function postRegister() { if (!Config::get('credentials.regallowed')) { return Redirect::route('account.register'); } $input = Binput::only(['first_name', 'last_name', 'email', 'password', 'password_confirmation']); $val = UserRepository::validate($input, array_k...
[ "public", "function", "postRegister", "(", ")", "{", "if", "(", "!", "Config", "::", "get", "(", "'credentials.regallowed'", ")", ")", "{", "return", "Redirect", "::", "route", "(", "'account.register'", ")", ";", "}", "$", "input", "=", "Binput", "::", ...
Attempt to register a new user. @return \Illuminate\Http\Response
[ "Attempt", "to", "register", "a", "new", "user", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/Http/Controllers/RegistrationController.php#L70-L127
227,055
javanile/moldable
src/Parser/Mysql/EnumTrait.php
EnumTrait.getNotationAspectsEnum
private function getNotationAspectsEnum($notation, $aspects) { // $enum = $this->parseEnumNotation($notation); if (!$enum) { return $aspects; } // //$aspects['Enum'] = $enum; $aspects['Default'] = $enum[0]; $aspects['Null'] = in_array(null...
php
private function getNotationAspectsEnum($notation, $aspects) { // $enum = $this->parseEnumNotation($notation); if (!$enum) { return $aspects; } // //$aspects['Enum'] = $enum; $aspects['Default'] = $enum[0]; $aspects['Null'] = in_array(null...
[ "private", "function", "getNotationAspectsEnum", "(", "$", "notation", ",", "$", "aspects", ")", "{", "//", "$", "enum", "=", "$", "this", "->", "parseEnumNotation", "(", "$", "notation", ")", ";", "if", "(", "!", "$", "enum", ")", "{", "return", "$", ...
Get notation aspects for enum. @param mixed $notation @param mixed $aspects
[ "Get", "notation", "aspects", "for", "enum", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Parser/Mysql/EnumTrait.php#L20-L43
227,056
javanile/moldable
src/Parser/Mysql/EnumTrait.php
EnumTrait.parseEnumNotation
private function parseEnumNotation($notation) { if (is_string($notation)) { $notation = json_decode(trim($notation, '<>')); if (json_last_error()) { return; } } return $notation; }
php
private function parseEnumNotation($notation) { if (is_string($notation)) { $notation = json_decode(trim($notation, '<>')); if (json_last_error()) { return; } } return $notation; }
[ "private", "function", "parseEnumNotation", "(", "$", "notation", ")", "{", "if", "(", "is_string", "(", "$", "notation", ")", ")", "{", "$", "notation", "=", "json_decode", "(", "trim", "(", "$", "notation", ",", "'<>'", ")", ")", ";", "if", "(", "j...
Parse enum if is inside a string. @param mixed $notation
[ "Parse", "enum", "if", "is", "inside", "a", "string", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Parser/Mysql/EnumTrait.php#L50-L61
227,057
BootstrapCMS/Credentials
src/Models/BaseModelTrait.php
BaseModelTrait.update
public function update(array $input = []) { DB::beginTransaction(); try { LaravelEvent::fire(static::$name.'.updating', $this); $this->beforeUpdate($input); $return = parent::update($input); $this->afterUpdate($input, $return); LaravelEven...
php
public function update(array $input = []) { DB::beginTransaction(); try { LaravelEvent::fire(static::$name.'.updating', $this); $this->beforeUpdate($input); $return = parent::update($input); $this->afterUpdate($input, $return); LaravelEven...
[ "public", "function", "update", "(", "array", "$", "input", "=", "[", "]", ")", "{", "DB", "::", "beginTransaction", "(", ")", ";", "try", "{", "LaravelEvent", "::", "fire", "(", "static", "::", "$", "name", ".", "'.updating'", ",", "$", "this", ")",...
Update an existing model. @param array $input @throws \Exception @return bool|int
[ "Update", "an", "existing", "model", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/Models/BaseModelTrait.php#L88-L106
227,058
BootstrapCMS/Credentials
src/Models/BaseModelTrait.php
BaseModelTrait.delete
public function delete() { DB::beginTransaction(); try { LaravelEvent::fire(static::$name.'.deleting', $this); $this->beforeDelete(); $return = parent::delete(); $this->afterDelete($return); LaravelEvent::fire(static::$name.'.deleted', $th...
php
public function delete() { DB::beginTransaction(); try { LaravelEvent::fire(static::$name.'.deleting', $this); $this->beforeDelete(); $return = parent::delete(); $this->afterDelete($return); LaravelEvent::fire(static::$name.'.deleted', $th...
[ "public", "function", "delete", "(", ")", "{", "DB", "::", "beginTransaction", "(", ")", ";", "try", "{", "LaravelEvent", "::", "fire", "(", "static", "::", "$", "name", ".", "'.deleting'", ",", "$", "this", ")", ";", "$", "this", "->", "beforeDelete",...
Delete an existing model. @throws \Exception @return bool
[ "Delete", "an", "existing", "model", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/Models/BaseModelTrait.php#L140-L158
227,059
javanile/moldable
src/Model/ReadApi.php
ReadApi.exists
public static function exists($query) { // static::applySchema(); // $table = self::getTable(); // $whereArray = []; // $valuesArray = []; // if (isset($query['where'])) { $whereArray[] = $query['where']; uns...
php
public static function exists($query) { // static::applySchema(); // $table = self::getTable(); // $whereArray = []; // $valuesArray = []; // if (isset($query['where'])) { $whereArray[] = $query['where']; uns...
[ "public", "static", "function", "exists", "(", "$", "query", ")", "{", "//", "static", "::", "applySchema", "(", ")", ";", "//", "$", "table", "=", "self", "::", "getTable", "(", ")", ";", "//", "$", "whereArray", "=", "[", "]", ";", "//", "$", "...
Alias of ping. @param type $query @return type
[ "Alias", "of", "ping", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Model/ReadApi.php#L261-L302
227,060
BootstrapCMS/Credentials
src/Presenters/AuthorPresenterTrait.php
AuthorPresenterTrait.author
public function author() { $user = $this->getWrappedObject()->user()->withTrashed()->first(['first_name', 'last_name']); if ($user) { return $user->first_name.' '.$user->last_name; } }
php
public function author() { $user = $this->getWrappedObject()->user()->withTrashed()->first(['first_name', 'last_name']); if ($user) { return $user->first_name.' '.$user->last_name; } }
[ "public", "function", "author", "(", ")", "{", "$", "user", "=", "$", "this", "->", "getWrappedObject", "(", ")", "->", "user", "(", ")", "->", "withTrashed", "(", ")", "->", "first", "(", "[", "'first_name'", ",", "'last_name'", "]", ")", ";", "if",...
Get the author's name. @return string
[ "Get", "the", "author", "s", "name", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/Presenters/AuthorPresenterTrait.php#L26-L33
227,061
aik099/CodingStandard
CodingStandard/Sniffs/Formatting/ItemAssignmentSniff.php
ItemAssignmentSniff.checkSpacing
protected function checkSpacing(File $phpcsFile, $stackPtr, $before) { if ($before === true) { $stackPtrDiff = -1; $errorWord = 'prefix'; $errorCode = 'Before'; } else { $stackPtrDiff = 1; $errorWord = 'follow'; $errorC...
php
protected function checkSpacing(File $phpcsFile, $stackPtr, $before) { if ($before === true) { $stackPtrDiff = -1; $errorWord = 'prefix'; $errorCode = 'Before'; } else { $stackPtrDiff = 1; $errorWord = 'follow'; $errorC...
[ "protected", "function", "checkSpacing", "(", "File", "$", "phpcsFile", ",", "$", "stackPtr", ",", "$", "before", ")", "{", "if", "(", "$", "before", "===", "true", ")", "{", "$", "stackPtrDiff", "=", "-", "1", ";", "$", "errorWord", "=", "'prefix'", ...
Checks spacing at given position. @param File $phpcsFile The file being scanned. @param int $stackPtr The position of the current token in the stack passed in $tokens. @param bool $before Determines direction in which to check spacing. @return void
[ "Checks", "spacing", "at", "given", "position", "." ]
0f65c52bf2d95d5068af9f73110770ddb9de8de7
https://github.com/aik099/CodingStandard/blob/0f65c52bf2d95d5068af9f73110770ddb9de8de7/CodingStandard/Sniffs/Formatting/ItemAssignmentSniff.php#L74-L125
227,062
andre487/php_rutils
Dt.php
Dt._processDateTime
private function _processDateTime($dateTime) { if (is_numeric($dateTime)) { $timestamp = $dateTime; $dateTime = new \DateTime(); $dateTime->setTimestamp($timestamp); } elseif (empty($dateTime)) { throw new \InvalidArgumentException('Date/time is empty'...
php
private function _processDateTime($dateTime) { if (is_numeric($dateTime)) { $timestamp = $dateTime; $dateTime = new \DateTime(); $dateTime->setTimestamp($timestamp); } elseif (empty($dateTime)) { throw new \InvalidArgumentException('Date/time is empty'...
[ "private", "function", "_processDateTime", "(", "$", "dateTime", ")", "{", "if", "(", "is_numeric", "(", "$", "dateTime", ")", ")", "{", "$", "timestamp", "=", "$", "dateTime", ";", "$", "dateTime", "=", "new", "\\", "DateTime", "(", ")", ";", "$", "...
Process mixed format date @param mixed $dateTime @return \DateTime @throws \InvalidArgumentException
[ "Process", "mixed", "format", "date" ]
f85a9f17d55259458326f657211c7b411a30bc53
https://github.com/andre487/php_rutils/blob/f85a9f17d55259458326f657211c7b411a30bc53/Dt.php#L115-L131
227,063
andre487/php_rutils
Dt.php
Dt._addResultSuffix
private function _addResultSuffix(\DateInterval $interval, $result) { return $interval->invert ? self::$PREFIX_IN."\xC2\xA0".$result : $result."\xC2\xA0".self::$SUFFIX_AGO; }
php
private function _addResultSuffix(\DateInterval $interval, $result) { return $interval->invert ? self::$PREFIX_IN."\xC2\xA0".$result : $result."\xC2\xA0".self::$SUFFIX_AGO; }
[ "private", "function", "_addResultSuffix", "(", "\\", "DateInterval", "$", "interval", ",", "$", "result", ")", "{", "return", "$", "interval", "->", "invert", "?", "self", "::", "$", "PREFIX_IN", ".", "\"\\xC2\\xA0\"", ".", "$", "result", ":", "$", "resul...
Add suffix or Postfix to string. @param \DateInterval $interval @param $result string @return string modified $result.
[ "Add", "suffix", "or", "Postfix", "to", "string", "." ]
f85a9f17d55259458326f657211c7b411a30bc53
https://github.com/andre487/php_rutils/blob/f85a9f17d55259458326f657211c7b411a30bc53/Dt.php#L315-L318
227,064
javanile/moldable
src/Model/TableApi.php
TableApi.getTable
public static function getTable() { $attribute = 'table'; if (!static::hasClassAttribute($attribute)) { $name = !isset(static::$table) ? static::getClassName() : static::$table; $conventionName = Functions::applyConventions( s...
php
public static function getTable() { $attribute = 'table'; if (!static::hasClassAttribute($attribute)) { $name = !isset(static::$table) ? static::getClassName() : static::$table; $conventionName = Functions::applyConventions( s...
[ "public", "static", "function", "getTable", "(", ")", "{", "$", "attribute", "=", "'table'", ";", "if", "(", "!", "static", "::", "hasClassAttribute", "(", "$", "attribute", ")", ")", "{", "$", "name", "=", "!", "isset", "(", "static", "::", "$", "ta...
Retrieve table name. @return string
[ "Retrieve", "table", "name", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Model/TableApi.php#L21-L41
227,065
OpenSkill/Datatable
src/OpenSkill/Datatable/Views/DatatableView.php
DatatableView.columns
public function columns($columnName, $label = null) { if (!is_string($columnName)) { throw new \InvalidArgumentException('$columnName must be set'); } if ($this->resetColumns) { $this->columns = []; $this->resetColumns = false; } if (is_nu...
php
public function columns($columnName, $label = null) { if (!is_string($columnName)) { throw new \InvalidArgumentException('$columnName must be set'); } if ($this->resetColumns) { $this->columns = []; $this->resetColumns = false; } if (is_nu...
[ "public", "function", "columns", "(", "$", "columnName", ",", "$", "label", "=", "null", ")", "{", "if", "(", "!", "is_string", "(", "$", "columnName", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'$columnName must be set'", ")", ...
Will set the columns for the view @param string $columnName The name of the column @param string $label The label for this column @return $this
[ "Will", "set", "the", "columns", "for", "the", "view" ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Views/DatatableView.php#L143-L158
227,066
OpenSkill/Datatable
src/OpenSkill/Datatable/Views/DatatableView.php
DatatableView.table
public function table() { if (empty($this->columns)) { throw new \InvalidArgumentException("There are no columns defined"); } return $this->viewFactory ->make($this->tableView, [ 'columns' => $this->columns, 'showHeaders' => $this->pri...
php
public function table() { if (empty($this->columns)) { throw new \InvalidArgumentException("There are no columns defined"); } return $this->viewFactory ->make($this->tableView, [ 'columns' => $this->columns, 'showHeaders' => $this->pri...
[ "public", "function", "table", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "columns", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "\"There are no columns defined\"", ")", ";", "}", "return", "$", "this", "->", "view...
Will render the table @return string the rendered view that represents the table
[ "Will", "render", "the", "table" ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Views/DatatableView.php#L165-L179
227,067
OpenSkill/Datatable
src/OpenSkill/Datatable/Views/DatatableView.php
DatatableView.script
public function script() { if (empty($this->columns)) { throw new \InvalidArgumentException("There are no columns defined"); } return $this->viewFactory ->make($this->scriptView, [ 'id' => $this->tableId, 'columns' => $this->columns, ...
php
public function script() { if (empty($this->columns)) { throw new \InvalidArgumentException("There are no columns defined"); } return $this->viewFactory ->make($this->scriptView, [ 'id' => $this->tableId, 'columns' => $this->columns, ...
[ "public", "function", "script", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "columns", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "\"There are no columns defined\"", ")", ";", "}", "return", "$", "this", "->", "vie...
Will render the javascript for the table @return string the rendered view that represents the script
[ "Will", "render", "the", "javascript", "for", "the", "table" ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Views/DatatableView.php#L186-L200
227,068
javanile/moldable
src/Database/ErrorApi.php
ErrorApi.error
public function error($type, $exception) { switch ($type) { // Trigger a connection-with-database error. case 'connect': $slug = 'Moldable connection error, '; $backtrace = $this->_trace; $offset = 0; break; ...
php
public function error($type, $exception) { switch ($type) { // Trigger a connection-with-database error. case 'connect': $slug = 'Moldable connection error, '; $backtrace = $this->_trace; $offset = 0; break; ...
[ "public", "function", "error", "(", "$", "type", ",", "$", "exception", ")", "{", "switch", "(", "$", "type", ")", "{", "// Trigger a connection-with-database error.", "case", "'connect'", ":", "$", "slug", "=", "'Moldable connection error, '", ";", "$", "backtr...
Trigger a error. @param object $exception Exception catched with try-catch @param mixed $type
[ "Trigger", "a", "error", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Database/ErrorApi.php#L22-L56
227,069
whatwedo/TableBundle
Table/Column.php
Column.getContents
public function getContents($row) { if (is_callable($this->options['callable'])) { if (is_array($this->options['callable'])) { return call_user_func($this->options['callable'], [$row]); } return $this->options['callable']($row); } $proper...
php
public function getContents($row) { if (is_callable($this->options['callable'])) { if (is_array($this->options['callable'])) { return call_user_func($this->options['callable'], [$row]); } return $this->options['callable']($row); } $proper...
[ "public", "function", "getContents", "(", "$", "row", ")", "{", "if", "(", "is_callable", "(", "$", "this", "->", "options", "[", "'callable'", "]", ")", ")", "{", "if", "(", "is_array", "(", "$", "this", "->", "options", "[", "'callable'", "]", ")",...
gets the content of the row @param $row @return string
[ "gets", "the", "content", "of", "the", "row" ]
b527b92dc1e59280cdaef4bd6e4722fc6f49359e
https://github.com/whatwedo/TableBundle/blob/b527b92dc1e59280cdaef4bd6e4722fc6f49359e/Table/Column.php#L74-L93
227,070
BootstrapCMS/Credentials
src/Http/Controllers/ActivationController.php
ActivationController.getActivate
public function getActivate($id, $code) { if (!$id || !$code) { throw new BadRequestHttpException(); } try { $user = Credentials::getUserProvider()->findById($id); if (!$user->attemptActivation($code)) { return Redirect::to(Config::get('c...
php
public function getActivate($id, $code) { if (!$id || !$code) { throw new BadRequestHttpException(); } try { $user = Credentials::getUserProvider()->findById($id); if (!$user->attemptActivation($code)) { return Redirect::to(Config::get('c...
[ "public", "function", "getActivate", "(", "$", "id", ",", "$", "code", ")", "{", "if", "(", "!", "$", "id", "||", "!", "$", "code", ")", "{", "throw", "new", "BadRequestHttpException", "(", ")", ";", "}", "try", "{", "$", "user", "=", "Credentials"...
Activate an existing user. @param int $id @param string $code @throws \Symfony\Component\HttpKernel\Exception\BadRequestHttpException @return \Illuminate\Http\Response
[ "Activate", "an", "existing", "user", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/Http/Controllers/ActivationController.php#L68-L93
227,071
BootstrapCMS/Credentials
src/CredentialsServiceProvider.php
CredentialsServiceProvider.setupBlade
protected function setupBlade(View $view) { $blade = $view->getEngineResolver()->resolve('blade')->getCompiler(); $blade->directive('auth', function ($expression) { return "<?php if (\GrahamCampbell\Credentials\Facades\Credentials::check() && \GrahamCampbell\Credentials\Facades\Credenti...
php
protected function setupBlade(View $view) { $blade = $view->getEngineResolver()->resolve('blade')->getCompiler(); $blade->directive('auth', function ($expression) { return "<?php if (\GrahamCampbell\Credentials\Facades\Credentials::check() && \GrahamCampbell\Credentials\Facades\Credenti...
[ "protected", "function", "setupBlade", "(", "View", "$", "view", ")", "{", "$", "blade", "=", "$", "view", "->", "getEngineResolver", "(", ")", "->", "resolve", "(", "'blade'", ")", "->", "getCompiler", "(", ")", ";", "$", "blade", "->", "directive", "...
Setup the blade compiler class. @param \Illuminate\Contracts\View\Factory $view @return void
[ "Setup", "the", "blade", "compiler", "class", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/CredentialsServiceProvider.php#L74-L85
227,072
BootstrapCMS/Credentials
src/CredentialsServiceProvider.php
CredentialsServiceProvider.registerRevisionRepository
protected function registerRevisionRepository() { $this->app->singleton('revisionrepository', function ($app) { $model = $app['config']['credentials.revision']; $revision = new $model(); $validator = $app['validator']; return new RevisionRepository($revision...
php
protected function registerRevisionRepository() { $this->app->singleton('revisionrepository', function ($app) { $model = $app['config']['credentials.revision']; $revision = new $model(); $validator = $app['validator']; return new RevisionRepository($revision...
[ "protected", "function", "registerRevisionRepository", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "'revisionrepository'", ",", "function", "(", "$", "app", ")", "{", "$", "model", "=", "$", "app", "[", "'config'", "]", "[", "'credenti...
Register the revision repository class. @return void
[ "Register", "the", "revision", "repository", "class", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/CredentialsServiceProvider.php#L126-L138
227,073
BootstrapCMS/Credentials
src/CredentialsServiceProvider.php
CredentialsServiceProvider.registerUserRepository
protected function registerUserRepository() { $this->app->singleton('userrepository', function ($app) { $model = $app['config']['sentry.users.model']; $user = new $model(); $validator = $app['validator']; return new UserRepository($user, $validator); ...
php
protected function registerUserRepository() { $this->app->singleton('userrepository', function ($app) { $model = $app['config']['sentry.users.model']; $user = new $model(); $validator = $app['validator']; return new UserRepository($user, $validator); ...
[ "protected", "function", "registerUserRepository", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "'userrepository'", ",", "function", "(", "$", "app", ")", "{", "$", "model", "=", "$", "app", "[", "'config'", "]", "[", "'sentry.users.mod...
Register the user repository class. @return void
[ "Register", "the", "user", "repository", "class", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/CredentialsServiceProvider.php#L145-L157
227,074
BootstrapCMS/Credentials
src/CredentialsServiceProvider.php
CredentialsServiceProvider.registerGroupRepository
protected function registerGroupRepository() { $this->app->singleton('grouprepository', function ($app) { $model = $app['config']['sentry.groups.model']; $group = new $model(); $validator = $app['validator']; return new GroupRepository($group, $validator); ...
php
protected function registerGroupRepository() { $this->app->singleton('grouprepository', function ($app) { $model = $app['config']['sentry.groups.model']; $group = new $model(); $validator = $app['validator']; return new GroupRepository($group, $validator); ...
[ "protected", "function", "registerGroupRepository", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "'grouprepository'", ",", "function", "(", "$", "app", ")", "{", "$", "model", "=", "$", "app", "[", "'config'", "]", "[", "'sentry.groups....
Register the group repository class. @return void
[ "Register", "the", "group", "repository", "class", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/CredentialsServiceProvider.php#L164-L176
227,075
BootstrapCMS/Credentials
src/CredentialsServiceProvider.php
CredentialsServiceProvider.registerCredentials
protected function registerCredentials() { $this->app->singleton('credentials', function ($app) { $sentry = $app['sentry']; $decorator = $app->make(PresenterDecorator::class); return new Credentials($sentry, $decorator); }); $this->app->alias('credential...
php
protected function registerCredentials() { $this->app->singleton('credentials', function ($app) { $sentry = $app['sentry']; $decorator = $app->make(PresenterDecorator::class); return new Credentials($sentry, $decorator); }); $this->app->alias('credential...
[ "protected", "function", "registerCredentials", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "'credentials'", ",", "function", "(", "$", "app", ")", "{", "$", "sentry", "=", "$", "app", "[", "'sentry'", "]", ";", "$", "decorator", "...
Register the credentials class. @return void
[ "Register", "the", "credentials", "class", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/CredentialsServiceProvider.php#L183-L193
227,076
BootstrapCMS/Credentials
src/CredentialsServiceProvider.php
CredentialsServiceProvider.registerLoginController
protected function registerLoginController() { $this->app->bind(LoginController::class, function ($app) { $throttler = $app['throttle']->get($app['request'], 10, 10); return new LoginController($throttler); }); }
php
protected function registerLoginController() { $this->app->bind(LoginController::class, function ($app) { $throttler = $app['throttle']->get($app['request'], 10, 10); return new LoginController($throttler); }); }
[ "protected", "function", "registerLoginController", "(", ")", "{", "$", "this", "->", "app", "->", "bind", "(", "LoginController", "::", "class", ",", "function", "(", "$", "app", ")", "{", "$", "throttler", "=", "$", "app", "[", "'throttle'", "]", "->",...
Register the login controller class. @return void
[ "Register", "the", "login", "controller", "class", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/CredentialsServiceProvider.php#L200-L207
227,077
BootstrapCMS/Credentials
src/CredentialsServiceProvider.php
CredentialsServiceProvider.registerRegistrationController
protected function registerRegistrationController() { $this->app->bind(RegistrationController::class, function ($app) { $throttler = $app['throttle']->get($app['request'], 5, 30); return new RegistrationController($throttler); }); }
php
protected function registerRegistrationController() { $this->app->bind(RegistrationController::class, function ($app) { $throttler = $app['throttle']->get($app['request'], 5, 30); return new RegistrationController($throttler); }); }
[ "protected", "function", "registerRegistrationController", "(", ")", "{", "$", "this", "->", "app", "->", "bind", "(", "RegistrationController", "::", "class", ",", "function", "(", "$", "app", ")", "{", "$", "throttler", "=", "$", "app", "[", "'throttle'", ...
Register the registration controller class. @return void
[ "Register", "the", "registration", "controller", "class", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/CredentialsServiceProvider.php#L214-L221
227,078
BootstrapCMS/Credentials
src/CredentialsServiceProvider.php
CredentialsServiceProvider.registerResetController
protected function registerResetController() { $this->app->bind(ResetController::class, function ($app) { $throttler = $app['throttle']->get($app['request'], 5, 30); return new ResetController($throttler); }); }
php
protected function registerResetController() { $this->app->bind(ResetController::class, function ($app) { $throttler = $app['throttle']->get($app['request'], 5, 30); return new ResetController($throttler); }); }
[ "protected", "function", "registerResetController", "(", ")", "{", "$", "this", "->", "app", "->", "bind", "(", "ResetController", "::", "class", ",", "function", "(", "$", "app", ")", "{", "$", "throttler", "=", "$", "app", "[", "'throttle'", "]", "->",...
Register the reset controller class. @return void
[ "Register", "the", "reset", "controller", "class", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/CredentialsServiceProvider.php#L228-L235
227,079
BootstrapCMS/Credentials
src/CredentialsServiceProvider.php
CredentialsServiceProvider.registerActivationController
protected function registerActivationController() { $this->app->bind(ActivationController::class, function ($app) { $throttler = $app['throttle']->get($app['request'], 5, 30); return new ActivationController($throttler); }); }
php
protected function registerActivationController() { $this->app->bind(ActivationController::class, function ($app) { $throttler = $app['throttle']->get($app['request'], 5, 30); return new ActivationController($throttler); }); }
[ "protected", "function", "registerActivationController", "(", ")", "{", "$", "this", "->", "app", "->", "bind", "(", "ActivationController", "::", "class", ",", "function", "(", "$", "app", ")", "{", "$", "throttler", "=", "$", "app", "[", "'throttle'", "]...
Register the resend controller class. @return void
[ "Register", "the", "resend", "controller", "class", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/CredentialsServiceProvider.php#L242-L249
227,080
javanile/moldable
src/Storable.php
Storable.store
public function store($values = null) { static::applySchema(); // update values before store if (is_array($values)) { foreach ($values as $field => $value) { $this->{$field} = $value; } } // if has primary update else insert $...
php
public function store($values = null) { static::applySchema(); // update values before store if (is_array($values)) { foreach ($values as $field => $value) { $this->{$field} = $value; } } // if has primary update else insert $...
[ "public", "function", "store", "(", "$", "values", "=", "null", ")", "{", "static", "::", "applySchema", "(", ")", ";", "// update values before store", "if", "(", "is_array", "(", "$", "values", ")", ")", "{", "foreach", "(", "$", "values", "as", "$", ...
Auto-store element method. @param null|mixed $values @return type
[ "Auto", "-", "store", "element", "method", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Storable.php#L70-L88
227,081
neoxygen/neo4j-neogen
src/Schema/Relationship.php
Relationship.addProperty
public function addProperty(RelationshipProperty $property) { foreach ($this->properties as $prop) { if ($prop->getName() === $property->getName()) { $this->properties->removeElement($prop); } } return $this->properties->add($property); }
php
public function addProperty(RelationshipProperty $property) { foreach ($this->properties as $prop) { if ($prop->getName() === $property->getName()) { $this->properties->removeElement($prop); } } return $this->properties->add($property); }
[ "public", "function", "addProperty", "(", "RelationshipProperty", "$", "property", ")", "{", "foreach", "(", "$", "this", "->", "properties", "as", "$", "prop", ")", "{", "if", "(", "$", "prop", "->", "getName", "(", ")", "===", "$", "property", "->", ...
Adds a relationship property to the collection and avoid duplicated @param RelationshipProperty $property @return bool
[ "Adds", "a", "relationship", "property", "to", "the", "collection", "and", "avoid", "duplicated" ]
3bc3ae1b95aae13915ce699b4f2d20762b2f0146
https://github.com/neoxygen/neo4j-neogen/blob/3bc3ae1b95aae13915ce699b4f2d20762b2f0146/src/Schema/Relationship.php#L100-L109
227,082
neoxygen/neo4j-neogen
src/Schema/Relationship.php
Relationship.hasProperty
public function hasProperty($name) { if (null !== $name) { $n = (string) $name; foreach ($this->properties as $property) { if ($property->getName() === $n) { return true; } } } return false; }
php
public function hasProperty($name) { if (null !== $name) { $n = (string) $name; foreach ($this->properties as $property) { if ($property->getName() === $n) { return true; } } } return false; }
[ "public", "function", "hasProperty", "(", "$", "name", ")", "{", "if", "(", "null", "!==", "$", "name", ")", "{", "$", "n", "=", "(", "string", ")", "$", "name", ";", "foreach", "(", "$", "this", "->", "properties", "as", "$", "property", ")", "{...
Checks whether or not this relationship has the property with the specified name @param string $name The relationship property name @return bool
[ "Checks", "whether", "or", "not", "this", "relationship", "has", "the", "property", "with", "the", "specified", "name" ]
3bc3ae1b95aae13915ce699b4f2d20762b2f0146
https://github.com/neoxygen/neo4j-neogen/blob/3bc3ae1b95aae13915ce699b4f2d20762b2f0146/src/Schema/Relationship.php#L131-L143
227,083
andre487/php_rutils
Numeral.php
Numeral.getPlural
public function getPlural($amount, array $variants, $absence = null) { if ($amount || $absence === null) { $result = RUtils::formatNumber($amount).' '.$this->choosePlural($amount, $variants); } else { $result = $absence; } return $result; }
php
public function getPlural($amount, array $variants, $absence = null) { if ($amount || $absence === null) { $result = RUtils::formatNumber($amount).' '.$this->choosePlural($amount, $variants); } else { $result = $absence; } return $result; }
[ "public", "function", "getPlural", "(", "$", "amount", ",", "array", "$", "variants", ",", "$", "absence", "=", "null", ")", "{", "if", "(", "$", "amount", "||", "$", "absence", "===", "null", ")", "{", "$", "result", "=", "RUtils", "::", "formatNumb...
Get proper case with value @param int $amount Amount of objects @param array $variants Variants (forms) of object in such form: array('1 object', '2 objects', '5 objects') @param string|null $absence If amount is zero will return it @return string|null
[ "Get", "proper", "case", "with", "value" ]
f85a9f17d55259458326f657211c7b411a30bc53
https://github.com/andre487/php_rutils/blob/f85a9f17d55259458326f657211c7b411a30bc53/Numeral.php#L79-L87
227,084
andre487/php_rutils
Numeral.php
Numeral.choosePlural
public function choosePlural($amount, array $variants) { if (sizeof($variants) < 3) { throw new \InvalidArgumentException('Incorrect values length (must be 3)'); } $amount = abs($amount); $mod10 = $amount % 10; $mod100 = $amount % 100; if ($mod10 == 1 &&...
php
public function choosePlural($amount, array $variants) { if (sizeof($variants) < 3) { throw new \InvalidArgumentException('Incorrect values length (must be 3)'); } $amount = abs($amount); $mod10 = $amount % 10; $mod100 = $amount % 100; if ($mod10 == 1 &&...
[ "public", "function", "choosePlural", "(", "$", "amount", ",", "array", "$", "variants", ")", "{", "if", "(", "sizeof", "(", "$", "variants", ")", "<", "3", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Incorrect values length (must be 3)'...
Choose proper case depending on amount @param int $amount Amount of objects @param string[] $variants Variants (forms) of object in such form: array('1 object', '2 objects', '5 objects') @return string Proper variant @throws \InvalidArgumentException Variants' length lesser than 3
[ "Choose", "proper", "case", "depending", "on", "amount" ]
f85a9f17d55259458326f657211c7b411a30bc53
https://github.com/andre487/php_rutils/blob/f85a9f17d55259458326f657211c7b411a30bc53/Numeral.php#L96-L115
227,085
andre487/php_rutils
Numeral.php
Numeral._sumStringOneOrder
private function _sumStringOneOrder($prevResult, $tmpVal, $gender, array $variants) { if ($tmpVal == 0) { return array($prevResult, $tmpVal); } $words = array(); $fiveItems = $variants[2]; $rest = $tmpVal % 1000; if ($rest < 0) { throw new \Ra...
php
private function _sumStringOneOrder($prevResult, $tmpVal, $gender, array $variants) { if ($tmpVal == 0) { return array($prevResult, $tmpVal); } $words = array(); $fiveItems = $variants[2]; $rest = $tmpVal % 1000; if ($rest < 0) { throw new \Ra...
[ "private", "function", "_sumStringOneOrder", "(", "$", "prevResult", ",", "$", "tmpVal", ",", "$", "gender", ",", "array", "$", "variants", ")", "{", "if", "(", "$", "tmpVal", "==", "0", ")", "{", "return", "array", "(", "$", "prevResult", ",", "$", ...
Make in-words representation of single order @param string $prevResult In-words representation of lower orders @param int $tmpVal Temporary value without lower orders @param int $gender (MALE, FEMALE or NEUTER) @param string[] $variants Variants of objects @throws \RangeException @return array ($result, $tmpVal)
[ "Make", "in", "-", "words", "representation", "of", "single", "order" ]
f85a9f17d55259458326f657211c7b411a30bc53
https://github.com/andre487/php_rutils/blob/f85a9f17d55259458326f657211c7b411a30bc53/Numeral.php#L180-L226
227,086
andre487/php_rutils
Numeral.php
Numeral.getInWords
public function getInWords($amount, $gender = RUtils::MALE) { if ($amount == (int)$amount) { return $this->getInWordsInt($amount, $gender); } else { return $this->getInWordsFloat($amount); } }
php
public function getInWords($amount, $gender = RUtils::MALE) { if ($amount == (int)$amount) { return $this->getInWordsInt($amount, $gender); } else { return $this->getInWordsFloat($amount); } }
[ "public", "function", "getInWords", "(", "$", "amount", ",", "$", "gender", "=", "RUtils", "::", "MALE", ")", "{", "if", "(", "$", "amount", "==", "(", "int", ")", "$", "amount", ")", "{", "return", "$", "this", "->", "getInWordsInt", "(", "$", "am...
Numeral in words @param float $amount Amount of objects @param int|null $gender (MALE, FEMALE, NEUTER or null) @return string In-words representation of numeral
[ "Numeral", "in", "words" ]
f85a9f17d55259458326f657211c7b411a30bc53
https://github.com/andre487/php_rutils/blob/f85a9f17d55259458326f657211c7b411a30bc53/Numeral.php#L234-L241
227,087
andre487/php_rutils
Numeral.php
Numeral.getInWordsInt
public function getInWordsInt($amount, $gender = RUtils::MALE) { $amount = round($amount); return $this->sumString($amount, $gender); }
php
public function getInWordsInt($amount, $gender = RUtils::MALE) { $amount = round($amount); return $this->sumString($amount, $gender); }
[ "public", "function", "getInWordsInt", "(", "$", "amount", ",", "$", "gender", "=", "RUtils", "::", "MALE", ")", "{", "$", "amount", "=", "round", "(", "$", "amount", ")", ";", "return", "$", "this", "->", "sumString", "(", "$", "amount", ",", "$", ...
Integer in words @param int $amount Amount of objects (0 <= amount <= PHP_INT_MAX) @param int $gender (MALE, FEMALE or NEUTER) @return string In-words representation of numeral
[ "Integer", "in", "words" ]
f85a9f17d55259458326f657211c7b411a30bc53
https://github.com/andre487/php_rutils/blob/f85a9f17d55259458326f657211c7b411a30bc53/Numeral.php#L249-L253
227,088
andre487/php_rutils
Numeral.php
Numeral._getFloatRemainder
private function _getFloatRemainder($value, $signs = 9) { if ($value == (int)$value) { return '0'; } $signs = min($signs, sizeof(self::$_FRACTIONS)); $value = number_format($value, $signs, '.', ''); list(, $remainder) = explode('.', $value); $remainder = ...
php
private function _getFloatRemainder($value, $signs = 9) { if ($value == (int)$value) { return '0'; } $signs = min($signs, sizeof(self::$_FRACTIONS)); $value = number_format($value, $signs, '.', ''); list(, $remainder) = explode('.', $value); $remainder = ...
[ "private", "function", "_getFloatRemainder", "(", "$", "value", ",", "$", "signs", "=", "9", ")", "{", "if", "(", "$", "value", "==", "(", "int", ")", "$", "value", ")", "{", "return", "'0'", ";", "}", "$", "signs", "=", "min", "(", "$", "signs",...
Get remainder of float, i.e. 2.05 -> '05' @param float $value @param int $signs @return string
[ "Get", "remainder", "of", "float", "i", ".", "e", ".", "2", ".", "05", "-", ">", "05" ]
f85a9f17d55259458326f657211c7b411a30bc53
https://github.com/andre487/php_rutils/blob/f85a9f17d55259458326f657211c7b411a30bc53/Numeral.php#L282-L297
227,089
hscstudio/yii2-heart
modules/admin/items/AssigmentController.php
AssigmentController.actionIndex
public function actionIndex() { if($this->searchClass === null){ $searchModel = new AssigmentSearch; } else { $class = $this->searchClass; $searchModel = new $class; } $dataProvider = $searchModel->search(\Yii::$app->request->getQ...
php
public function actionIndex() { if($this->searchClass === null){ $searchModel = new AssigmentSearch; } else { $class = $this->searchClass; $searchModel = new $class; } $dataProvider = $searchModel->search(\Yii::$app->request->getQ...
[ "public", "function", "actionIndex", "(", ")", "{", "if", "(", "$", "this", "->", "searchClass", "===", "null", ")", "{", "$", "searchModel", "=", "new", "AssigmentSearch", ";", "}", "else", "{", "$", "class", "=", "$", "this", "->", "searchClass", ";"...
Lists all Assigment models. @return mixed
[ "Lists", "all", "Assigment", "models", "." ]
7c54c7794c5045c0beb1d8bd70b287278eddbeee
https://github.com/hscstudio/yii2-heart/blob/7c54c7794c5045c0beb1d8bd70b287278eddbeee/modules/admin/items/AssigmentController.php#L50-L67
227,090
hscstudio/yii2-heart
modules/admin/items/AssigmentController.php
AssigmentController.actionView
public function actionView($id) { $model = $this->findModel($id); $authManager = Yii::$app->authManager; $avaliable = []; foreach ($authManager->getRoles() as $role) { $avaliable[$role->name] = $role->name; } $assigned = []; foreach ($authManager->...
php
public function actionView($id) { $model = $this->findModel($id); $authManager = Yii::$app->authManager; $avaliable = []; foreach ($authManager->getRoles() as $role) { $avaliable[$role->name] = $role->name; } $assigned = []; foreach ($authManager->...
[ "public", "function", "actionView", "(", "$", "id", ")", "{", "$", "model", "=", "$", "this", "->", "findModel", "(", "$", "id", ")", ";", "$", "authManager", "=", "Yii", "::", "$", "app", "->", "authManager", ";", "$", "avaliable", "=", "[", "]", ...
Displays a single Assigment model. @param integer $id @return mixed
[ "Displays", "a", "single", "Assigment", "model", "." ]
7c54c7794c5045c0beb1d8bd70b287278eddbeee
https://github.com/hscstudio/yii2-heart/blob/7c54c7794c5045c0beb1d8bd70b287278eddbeee/modules/admin/items/AssigmentController.php#L74-L94
227,091
aik099/CodingStandard
CodingStandard/Sniffs/Strings/ConcatenationSpacingSniff.php
ConcatenationSpacingSniff.checkContent
protected function checkContent(File $phpcsFile, $stackPtr, $before) { if ($before === true) { $contentToken = ($phpcsFile->findPrevious( T_WHITESPACE, ($stackPtr - 1), null, true ) + 1); $errorWord = 'bef...
php
protected function checkContent(File $phpcsFile, $stackPtr, $before) { if ($before === true) { $contentToken = ($phpcsFile->findPrevious( T_WHITESPACE, ($stackPtr - 1), null, true ) + 1); $errorWord = 'bef...
[ "protected", "function", "checkContent", "(", "File", "$", "phpcsFile", ",", "$", "stackPtr", ",", "$", "before", ")", "{", "if", "(", "$", "before", "===", "true", ")", "{", "$", "contentToken", "=", "(", "$", "phpcsFile", "->", "findPrevious", "(", "...
Checks content before concat operator. @param File $phpcsFile The file being scanned. @param int $stackPtr The position of the current token in the stack passed in $tokens. @param bool $before Check content before concat operator. @return void
[ "Checks", "content", "before", "concat", "operator", "." ]
0f65c52bf2d95d5068af9f73110770ddb9de8de7
https://github.com/aik099/CodingStandard/blob/0f65c52bf2d95d5068af9f73110770ddb9de8de7/CodingStandard/Sniffs/Strings/ConcatenationSpacingSniff.php#L74-L135
227,092
OpenSkill/Datatable
src/OpenSkill/Datatable/Providers/CollectionProvider.php
CollectionProvider.transformCollectionData
private function transformCollectionData($columnConfiguration, $searchFunc) { $this->collection->transform(function ($data) use ($columnConfiguration, $searchFunc) { $entry = []; // for each column call the callback foreach ($columnConfiguration as $i => $col) { ...
php
private function transformCollectionData($columnConfiguration, $searchFunc) { $this->collection->transform(function ($data) use ($columnConfiguration, $searchFunc) { $entry = []; // for each column call the callback foreach ($columnConfiguration as $i => $col) { ...
[ "private", "function", "transformCollectionData", "(", "$", "columnConfiguration", ",", "$", "searchFunc", ")", "{", "$", "this", "->", "collection", "->", "transform", "(", "function", "(", "$", "data", ")", "use", "(", "$", "columnConfiguration", ",", "$", ...
Transform collection data. Used for searches. @param ColumnConfiguration[] $columnConfiguration @param $searchFunc
[ "Transform", "collection", "data", ".", "Used", "for", "searches", "." ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Providers/CollectionProvider.php#L150-L178
227,093
OpenSkill/Datatable
src/OpenSkill/Datatable/Providers/CollectionProvider.php
CollectionProvider.removeEmptyRowsFromCollection
private function removeEmptyRowsFromCollection() { $this->collection = $this->collection->reject(function ($data) { if (empty($data)) { return true; } else { return false; } }); }
php
private function removeEmptyRowsFromCollection() { $this->collection = $this->collection->reject(function ($data) { if (empty($data)) { return true; } else { return false; } }); }
[ "private", "function", "removeEmptyRowsFromCollection", "(", ")", "{", "$", "this", "->", "collection", "=", "$", "this", "->", "collection", "->", "reject", "(", "function", "(", "$", "data", ")", "{", "if", "(", "empty", "(", "$", "data", ")", ")", "...
Remove the empty rows from the collection @see compileCollection
[ "Remove", "the", "empty", "rows", "from", "the", "collection" ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Providers/CollectionProvider.php#L185-L194
227,094
OpenSkill/Datatable
src/OpenSkill/Datatable/Providers/CollectionProvider.php
CollectionProvider.sortCollection
private function sortCollection() { if ($this->queryConfiguration->hasOrderColumn()) { $order = $this->queryConfiguration->orderColumns(); $orderFunc = $this->defaultGlobalOrderFunction; $this->collection = $this->collection->sort(function ($first, $second) use ($order, $...
php
private function sortCollection() { if ($this->queryConfiguration->hasOrderColumn()) { $order = $this->queryConfiguration->orderColumns(); $orderFunc = $this->defaultGlobalOrderFunction; $this->collection = $this->collection->sort(function ($first, $second) use ($order, $...
[ "private", "function", "sortCollection", "(", ")", "{", "if", "(", "$", "this", "->", "queryConfiguration", "->", "hasOrderColumn", "(", ")", ")", "{", "$", "order", "=", "$", "this", "->", "queryConfiguration", "->", "orderColumns", "(", ")", ";", "$", ...
Will sort the internal collection based on the given query configuration. Most tables only support the ordering by just one column, but we will enable sorting on all columns here
[ "Will", "sort", "the", "internal", "collection", "based", "on", "the", "given", "query", "configuration", ".", "Most", "tables", "only", "support", "the", "ordering", "by", "just", "one", "column", "but", "we", "will", "enable", "sorting", "on", "all", "colu...
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Providers/CollectionProvider.php#L236-L245
227,095
OpenSkill/Datatable
src/OpenSkill/Datatable/Versions/Datatable19Version.php
Datatable19Version.createResponse
public function createResponse( ResponseData $data, QueryConfiguration $queryConfiguration, array $columnConfigurations ) { $responseData = [ 'sEcho' => $queryConfiguration->drawCall(), 'iTotalRecords' => $data->totalDataCount(), 'iTotalDisplayReco...
php
public function createResponse( ResponseData $data, QueryConfiguration $queryConfiguration, array $columnConfigurations ) { $responseData = [ 'sEcho' => $queryConfiguration->drawCall(), 'iTotalRecords' => $data->totalDataCount(), 'iTotalDisplayReco...
[ "public", "function", "createResponse", "(", "ResponseData", "$", "data", ",", "QueryConfiguration", "$", "queryConfiguration", ",", "array", "$", "columnConfigurations", ")", "{", "$", "responseData", "=", "[", "'sEcho'", "=>", "$", "queryConfiguration", "->", "d...
Is responsible to take the generated data and prepare a response for it. @param ResponseData $data The processed data. @param QueryConfiguration $queryConfiguration the query configuration for the current request. @param ColumnConfiguration[] $columnConfigurations the column configurations for the current data table. @...
[ "Is", "responsible", "to", "take", "the", "generated", "data", "and", "prepare", "a", "response", "for", "it", "." ]
e9814345dca4d0427da512f17c24117797e6ffbb
https://github.com/OpenSkill/Datatable/blob/e9814345dca4d0427da512f17c24117797e6ffbb/src/OpenSkill/Datatable/Versions/Datatable19Version.php#L41-L54
227,096
hscstudio/yii2-heart
helpers/Kalkun.php
Kalkun.HexToAscii
public static function HexToAscii($hex) { $ascii = ''; if (strlen($hex) % 2 == 1) $hex = '0'.$hex; for($i = 0; $i < strlen($hex); $i += 2) $ascii .= chr(base_convert(substr($hex, $i, 2), 16, 10)); return $ascii; }
php
public static function HexToAscii($hex) { $ascii = ''; if (strlen($hex) % 2 == 1) $hex = '0'.$hex; for($i = 0; $i < strlen($hex); $i += 2) $ascii .= chr(base_convert(substr($hex, $i, 2), 16, 10)); return $ascii; }
[ "public", "static", "function", "HexToAscii", "(", "$", "hex", ")", "{", "$", "ascii", "=", "''", ";", "if", "(", "strlen", "(", "$", "hex", ")", "%", "2", "==", "1", ")", "$", "hex", "=", "'0'", ".", "$", "hex", ";", "for", "(", "$", "i", ...
of characters in length
[ "of", "characters", "in", "length" ]
7c54c7794c5045c0beb1d8bd70b287278eddbeee
https://github.com/hscstudio/yii2-heart/blob/7c54c7794c5045c0beb1d8bd70b287278eddbeee/helpers/Kalkun.php#L32-L43
227,097
javanile/moldable
src/Writer/MysqlWriter.php
MysqlWriter.createTable
public function createTable($table, $schema) { // $columnsArray = []; // loop throut schema foreach ($schema as $field => $attributes) { if (is_numeric($field) && is_string($attributes)) { $field = $attributes; $attributes = []; ...
php
public function createTable($table, $schema) { // $columnsArray = []; // loop throut schema foreach ($schema as $field => $attributes) { if (is_numeric($field) && is_string($attributes)) { $field = $attributes; $attributes = []; ...
[ "public", "function", "createTable", "(", "$", "table", ",", "$", "schema", ")", "{", "//", "$", "columnsArray", "=", "[", "]", ";", "// loop throut schema", "foreach", "(", "$", "schema", "as", "$", "field", "=>", "$", "attributes", ")", "{", "if", "(...
Prepare sql code to create a table. @param string $table The name of table to create @param array $schema Skema of the table contain column definitions @return string Sql code statament of CREATE TABLE
[ "Prepare", "sql", "code", "to", "create", "a", "table", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Writer/MysqlWriter.php#L68-L95
227,098
javanile/moldable
src/Writer/MysqlWriter.php
MysqlWriter.alterTableChange
public function alterTableChange($table, $field, $attributes) { // $column = $this->columnDefinition($attributes); // $sql = "ALTER TABLE `{$table}` CHANGE COLUMN `{$field}` `{$field}` {$column}"; // return $sql; }
php
public function alterTableChange($table, $field, $attributes) { // $column = $this->columnDefinition($attributes); // $sql = "ALTER TABLE `{$table}` CHANGE COLUMN `{$field}` `{$field}` {$column}"; // return $sql; }
[ "public", "function", "alterTableChange", "(", "$", "table", ",", "$", "field", ",", "$", "attributes", ")", "{", "//", "$", "column", "=", "$", "this", "->", "columnDefinition", "(", "$", "attributes", ")", ";", "//", "$", "sql", "=", "\"ALTER TABLE `{$...
Retrieve sql to alter table definition. @param type $t @param type $f @param type $d @param mixed $table @param mixed $field @param mixed $attributes @return type
[ "Retrieve", "sql", "to", "alter", "table", "definition", "." ]
463ec60ba1fc00ffac39416302103af47aae42fb
https://github.com/javanile/moldable/blob/463ec60ba1fc00ffac39416302103af47aae42fb/src/Writer/MysqlWriter.php#L128-L138
227,099
BootstrapCMS/Credentials
src/Repositories/PaginateRepositoryTrait.php
PaginateRepositoryTrait.paginate
public function paginate() { $model = $this->model; if (property_exists($model, 'order')) { $paginator = $model::orderBy($model::$order, $model::$sort)->paginate($model::$paginate, $model::$index); } else { $paginator = $model::paginate($model::$paginate, $model::$in...
php
public function paginate() { $model = $this->model; if (property_exists($model, 'order')) { $paginator = $model::orderBy($model::$order, $model::$sort)->paginate($model::$paginate, $model::$index); } else { $paginator = $model::paginate($model::$paginate, $model::$in...
[ "public", "function", "paginate", "(", ")", "{", "$", "model", "=", "$", "this", "->", "model", ";", "if", "(", "property_exists", "(", "$", "model", ",", "'order'", ")", ")", "{", "$", "paginator", "=", "$", "model", "::", "orderBy", "(", "$", "mo...
Get a paginated list of the models. @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException @return \Illuminate\Database\Eloquent\Collection
[ "Get", "a", "paginated", "list", "of", "the", "models", "." ]
128c5359eea7417ca95670933a28d4e6c7e01e6b
https://github.com/BootstrapCMS/Credentials/blob/128c5359eea7417ca95670933a28d4e6c7e01e6b/src/Repositories/PaginateRepositoryTrait.php#L38-L57