repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
webtown-php/KunstmaanExtensionBundle
src/Command/UserEditCommand.php
UserEditCommand.getChoiceBySelection
protected function getChoiceBySelection($selection) { preg_match('/^[^(]+\(([^\)]+)\)$/', $selection, $matches); if (count($matches) < 2) { return; } $username = $matches[1]; foreach ($this->choices as $item) { if ($item->getUsername() === $username) {...
php
protected function getChoiceBySelection($selection) { preg_match('/^[^(]+\(([^\)]+)\)$/', $selection, $matches); if (count($matches) < 2) { return; } $username = $matches[1]; foreach ($this->choices as $item) { if ($item->getUsername() === $username) {...
[ "protected", "function", "getChoiceBySelection", "(", "$", "selection", ")", "{", "preg_match", "(", "'/^[^(]+\\(([^\\)]+)\\)$/'", ",", "$", "selection", ",", "$", "matches", ")", ";", "if", "(", "count", "(", "$", "matches", ")", "<", "2", ")", "{", "retu...
Find User by username @param string $username @return User
[ "Find", "User", "by", "username" ]
train
https://github.com/webtown-php/KunstmaanExtensionBundle/blob/86c656c131295fe1f3f7694fd4da1e5e454076b9/src/Command/UserEditCommand.php#L212-L226
webtown-php/KunstmaanExtensionBundle
src/Command/UserEditCommand.php
UserEditCommand.getChoiceByUsernameOrEmail
protected function getChoiceByUsernameOrEmail($selection) { foreach ($this->choices as $item) { if ($item->getUsername() === $selection) { return $item; } if ($item->getEmail() === $selection) { return $item; } } ...
php
protected function getChoiceByUsernameOrEmail($selection) { foreach ($this->choices as $item) { if ($item->getUsername() === $selection) { return $item; } if ($item->getEmail() === $selection) { return $item; } } ...
[ "protected", "function", "getChoiceByUsernameOrEmail", "(", "$", "selection", ")", "{", "foreach", "(", "$", "this", "->", "choices", "as", "$", "item", ")", "{", "if", "(", "$", "item", "->", "getUsername", "(", ")", "===", "$", "selection", ")", "{", ...
Find User by username or email @param string $username @return User
[ "Find", "User", "by", "username", "or", "email" ]
train
https://github.com/webtown-php/KunstmaanExtensionBundle/blob/86c656c131295fe1f3f7694fd4da1e5e454076b9/src/Command/UserEditCommand.php#L235-L247
webtown-php/KunstmaanExtensionBundle
src/Command/UserEditCommand.php
UserEditCommand.getNewValues
protected function getNewValues(User $user) { $newProps = new UserUpdater(); $this->logger->section('Editing user ' . $user->getEmail() . ' (' . $user->getUsername() . ')'); $this->logger->comment('leave empty to keep unchanged'); $newProps->setUsername($this->ask(new Question('Usern...
php
protected function getNewValues(User $user) { $newProps = new UserUpdater(); $this->logger->section('Editing user ' . $user->getEmail() . ' (' . $user->getUsername() . ')'); $this->logger->comment('leave empty to keep unchanged'); $newProps->setUsername($this->ask(new Question('Usern...
[ "protected", "function", "getNewValues", "(", "User", "$", "user", ")", "{", "$", "newProps", "=", "new", "UserUpdater", "(", ")", ";", "$", "this", "->", "logger", "->", "section", "(", "'Editing user '", ".", "$", "user", "->", "getEmail", "(", ")", ...
Ask for new user properties @param User $user @return UserUpdater
[ "Ask", "for", "new", "user", "properties" ]
train
https://github.com/webtown-php/KunstmaanExtensionBundle/blob/86c656c131295fe1f3f7694fd4da1e5e454076b9/src/Command/UserEditCommand.php#L268-L280
okitcom/ok-lib-php
src/Client.php
Client.curl
protected function curl($url, $req = array(), $auth = TRUE, $method = "GET", $json = true) { $header = []; if ($json) { $header[] = 'Content-Type: application/json'; $header[] = 'Accept: application/json'; } else { $header[] = 'Accept: text/html,application/js...
php
protected function curl($url, $req = array(), $auth = TRUE, $method = "GET", $json = true) { $header = []; if ($json) { $header[] = 'Content-Type: application/json'; $header[] = 'Accept: application/json'; } else { $header[] = 'Accept: text/html,application/js...
[ "protected", "function", "curl", "(", "$", "url", ",", "$", "req", "=", "array", "(", ")", ",", "$", "auth", "=", "TRUE", ",", "$", "method", "=", "\"GET\"", ",", "$", "json", "=", "true", ")", "{", "$", "header", "=", "[", "]", ";", "if", "(...
Calls a url on the OK service @param $url @param mixed $req Query parameters @param bool $auth Should use authentication for request @param string $method HTTP Method, either GET or POST @param bool $json whether this request should use json @return mixed|string @throws NetworkException
[ "Calls", "a", "url", "on", "the", "OK", "service" ]
train
https://github.com/okitcom/ok-lib-php/blob/1f441f3d216af7c952788e864bfe66bc4f089467/src/Client.php#L83-L160
yoanm/symfony-jsonrpc-http-server-doc
src/DependencyInjection/JsonRpcHttpServerDocExtension.php
JsonRpcHttpServerDocExtension.load
public function load(array $configs, ContainerBuilder $container) { $this->compileAndProcessConfigurations($configs, $container); $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.sdk.infra.yaml'); $loader->load('serv...
php
public function load(array $configs, ContainerBuilder $container) { $this->compileAndProcessConfigurations($configs, $container); $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.sdk.infra.yaml'); $loader->load('serv...
[ "public", "function", "load", "(", "array", "$", "configs", ",", "ContainerBuilder", "$", "container", ")", "{", "$", "this", "->", "compileAndProcessConfigurations", "(", "$", "configs", ",", "$", "container", ")", ";", "$", "loader", "=", "new", "YamlFileL...
{@inheritdoc}
[ "{" ]
train
https://github.com/yoanm/symfony-jsonrpc-http-server-doc/blob/7a59862f74fef29d0e2ad017188977419503ad94/src/DependencyInjection/JsonRpcHttpServerDocExtension.php#L27-L36
askupasoftware/amarkal
Extensions/WordPress/Admin/Notifier.php
Notifier.notify
static function notify( $message, $type, $page = null ) { global $pagenow; if( ( null != $page && $page == $pagenow ) || null == $page) { add_action( 'admin_notices', create_function( '',"echo '<div class=\"".$type."\"><p>".$message."</p></div>';" ) ); } ...
php
static function notify( $message, $type, $page = null ) { global $pagenow; if( ( null != $page && $page == $pagenow ) || null == $page) { add_action( 'admin_notices', create_function( '',"echo '<div class=\"".$type."\"><p>".$message."</p></div>';" ) ); } ...
[ "static", "function", "notify", "(", "$", "message", ",", "$", "type", ",", "$", "page", "=", "null", ")", "{", "global", "$", "pagenow", ";", "if", "(", "(", "null", "!=", "$", "page", "&&", "$", "page", "==", "$", "pagenow", ")", "||", "null", ...
Register an admin notification. @global string $pagenow The current admin page. @param string $message The message to print. @param string $type The type of notification [self::ERROR|self::SUCCESS]. @param string $page (optional) A specific admin page in which the notification should appear. If no page is...
[ "Register", "an", "admin", "notification", "." ]
train
https://github.com/askupasoftware/amarkal/blob/fe8283e2d6847ef697abec832da7ee741a85058c/Extensions/WordPress/Admin/Notifier.php#L39-L47
joseph-walker/vector
src/Lib/Objects.php
Objects.__setProp
protected static function __setProp($key, $val, $obj) { $newObj = clone $obj; /** @noinspection PhpVariableVariableInspection */ $newObj->$key = $val; return $newObj; }
php
protected static function __setProp($key, $val, $obj) { $newObj = clone $obj; /** @noinspection PhpVariableVariableInspection */ $newObj->$key = $val; return $newObj; }
[ "protected", "static", "function", "__setProp", "(", "$", "key", ",", "$", "val", ",", "$", "obj", ")", "{", "$", "newObj", "=", "clone", "$", "obj", ";", "/** @noinspection PhpVariableVariableInspection */", "$", "newObj", "->", "$", "key", "=", "$", "val...
Set Property Sets a property on the object @example Object::setValue('value', new stdClass(), 'hi!'); // object(stdClass)#1 (1) { // ["value"]=> // string(3) "hi!" // } @type String -> a -> Object a -> Object a @param String $key Property to set @param mixed $val Value @param Object $obj Object @return Obje...
[ "Set", "Property" ]
train
https://github.com/joseph-walker/vector/blob/e349aa2e9e0535b1993f9fffc0476e7fd8e113fc/src/Lib/Objects.php#L36-L43
joseph-walker/vector
src/Lib/Objects.php
Objects.__assign
protected static function __assign($props, $objOriginal) { $obj = clone $objOriginal; /** @noinspection PhpParamsInspection */ return Arrays::foldl( function ($obj, $setter) { return $setter($obj); }, $obj, Arrays::mapIndexed(L...
php
protected static function __assign($props, $objOriginal) { $obj = clone $objOriginal; /** @noinspection PhpParamsInspection */ return Arrays::foldl( function ($obj, $setter) { return $setter($obj); }, $obj, Arrays::mapIndexed(L...
[ "protected", "static", "function", "__assign", "(", "$", "props", ",", "$", "objOriginal", ")", "{", "$", "obj", "=", "clone", "$", "objOriginal", ";", "/** @noinspection PhpParamsInspection */", "return", "Arrays", "::", "foldl", "(", "function", "(", "$", "o...
Assign Properties Set/Update properties on the object using a key/value array @example Object::assign(['value' => 'hi!'], new stdClass); // object(stdClass)#1 (1) { // ["value"]=> // string(3) "hi!" // } @type array props -> Object objOriginal -> Object objUpdated @param $props @param $objOriginal @return mixed
[ "Assign", "Properties" ]
train
https://github.com/joseph-walker/vector/blob/e349aa2e9e0535b1993f9fffc0476e7fd8e113fc/src/Lib/Objects.php#L63-L75
yuncms/framework
src/admin/models/AdminBizRuleSearch.php
AdminBizRuleSearch.search
public function search($params) { /* @var \yii\rbac\DbManager $authManager */ $authManager = Yii::$app->authManager; $models = []; $included = !($this->load($params) && $this->validate() && trim($this->name) !== ''); foreach ($authManager->getRules() as $name => $item) { ...
php
public function search($params) { /* @var \yii\rbac\DbManager $authManager */ $authManager = Yii::$app->authManager; $models = []; $included = !($this->load($params) && $this->validate() && trim($this->name) !== ''); foreach ($authManager->getRules() as $name => $item) { ...
[ "public", "function", "search", "(", "$", "params", ")", "{", "/* @var \\yii\\rbac\\DbManager $authManager */", "$", "authManager", "=", "Yii", "::", "$", "app", "->", "authManager", ";", "$", "models", "=", "[", "]", ";", "$", "included", "=", "!", "(", "...
Search BizRule @param array $params @return \yii\data\ActiveDataProvider|\yii\data\ArrayDataProvider
[ "Search", "BizRule" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/admin/models/AdminBizRuleSearch.php#L47-L62
factorio-item-browser/export-data
src/Registry/EntityRegistry.php
EntityRegistry.set
public function set(EntityInterface $entity): string { $hash = $entity->calculateHash(); $content = $this->encodeContent($entity->writeData()); $this->saveContent($hash, $content); return $hash; }
php
public function set(EntityInterface $entity): string { $hash = $entity->calculateHash(); $content = $this->encodeContent($entity->writeData()); $this->saveContent($hash, $content); return $hash; }
[ "public", "function", "set", "(", "EntityInterface", "$", "entity", ")", ":", "string", "{", "$", "hash", "=", "$", "entity", "->", "calculateHash", "(", ")", ";", "$", "content", "=", "$", "this", "->", "encodeContent", "(", "$", "entity", "->", "writ...
Sets the specified entity into the registry. @param EntityInterface $entity @return string The hash used to save the entity.
[ "Sets", "the", "specified", "entity", "into", "the", "registry", "." ]
train
https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Registry/EntityRegistry.php#L51-L57
factorio-item-browser/export-data
src/Registry/EntityRegistry.php
EntityRegistry.get
public function get(string $hash): ?EntityInterface { $result = null; $content = $this->loadContent($hash); if ($content !== null) { $result = $this->createEntityFromContent($content); } return $result; }
php
public function get(string $hash): ?EntityInterface { $result = null; $content = $this->loadContent($hash); if ($content !== null) { $result = $this->createEntityFromContent($content); } return $result; }
[ "public", "function", "get", "(", "string", "$", "hash", ")", ":", "?", "EntityInterface", "{", "$", "result", "=", "null", ";", "$", "content", "=", "$", "this", "->", "loadContent", "(", "$", "hash", ")", ";", "if", "(", "$", "content", "!==", "n...
Returns the entity with the specified hash. @param string $hash @return EntityInterface|null
[ "Returns", "the", "entity", "with", "the", "specified", "hash", "." ]
train
https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Registry/EntityRegistry.php#L64-L72
factorio-item-browser/export-data
src/Registry/EntityRegistry.php
EntityRegistry.createEntityFromContent
protected function createEntityFromContent(string $content): EntityInterface { $result = $this->createEntity(); $result->readData(new DataContainer($this->decodeContent($content))); return $result; }
php
protected function createEntityFromContent(string $content): EntityInterface { $result = $this->createEntity(); $result->readData(new DataContainer($this->decodeContent($content))); return $result; }
[ "protected", "function", "createEntityFromContent", "(", "string", "$", "content", ")", ":", "EntityInterface", "{", "$", "result", "=", "$", "this", "->", "createEntity", "(", ")", ";", "$", "result", "->", "readData", "(", "new", "DataContainer", "(", "$",...
Creates an entity from the specified content. @param string $content @return EntityInterface
[ "Creates", "an", "entity", "from", "the", "specified", "content", "." ]
train
https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Registry/EntityRegistry.php#L97-L102
redaigbaria/oauth2
src/Entity/SessionEntity.php
SessionEntity.associateScope
public function associateScope(ScopeEntity $scope) { if (!isset($this->scopes[$scope->getId()])) { $this->scopes[$scope->getId()] = $scope; } return $this; }
php
public function associateScope(ScopeEntity $scope) { if (!isset($this->scopes[$scope->getId()])) { $this->scopes[$scope->getId()] = $scope; } return $this; }
[ "public", "function", "associateScope", "(", "ScopeEntity", "$", "scope", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "scopes", "[", "$", "scope", "->", "getId", "(", ")", "]", ")", ")", "{", "$", "this", "->", "scopes", "[", "$", ...
Associate a scope @param \League\OAuth2\Server\Entity\ScopeEntity $scope @return self
[ "Associate", "a", "scope" ]
train
https://github.com/redaigbaria/oauth2/blob/54cca4aaaff6a095cbf1c8010f2fe2cc7de4e45a/src/Entity/SessionEntity.php#L130-L137
redaigbaria/oauth2
src/Entity/SessionEntity.php
SessionEntity.hasScope
public function hasScope($scope) { if ($this->scopes === null) { $this->getScopes(); } return isset($this->scopes[$scope]); }
php
public function hasScope($scope) { if ($this->scopes === null) { $this->getScopes(); } return isset($this->scopes[$scope]); }
[ "public", "function", "hasScope", "(", "$", "scope", ")", "{", "if", "(", "$", "this", "->", "scopes", "===", "null", ")", "{", "$", "this", "->", "getScopes", "(", ")", ";", "}", "return", "isset", "(", "$", "this", "->", "scopes", "[", "$", "sc...
Check if access token has an associated scope @param string $scope Scope to check @return bool
[ "Check", "if", "access", "token", "has", "an", "associated", "scope" ]
train
https://github.com/redaigbaria/oauth2/blob/54cca4aaaff6a095cbf1c8010f2fe2cc7de4e45a/src/Entity/SessionEntity.php#L146-L153
redaigbaria/oauth2
src/Entity/SessionEntity.php
SessionEntity.getScopes
public function getScopes() { if ($this->scopes === null) { $this->scopes = $this->formatScopes($this->server->getSessionStorage()->getScopes($this)); } return $this->scopes; }
php
public function getScopes() { if ($this->scopes === null) { $this->scopes = $this->formatScopes($this->server->getSessionStorage()->getScopes($this)); } return $this->scopes; }
[ "public", "function", "getScopes", "(", ")", "{", "if", "(", "$", "this", "->", "scopes", "===", "null", ")", "{", "$", "this", "->", "scopes", "=", "$", "this", "->", "formatScopes", "(", "$", "this", "->", "server", "->", "getSessionStorage", "(", ...
Return all scopes associated with the session @return \League\OAuth2\Server\Entity\ScopeEntity[]
[ "Return", "all", "scopes", "associated", "with", "the", "session" ]
train
https://github.com/redaigbaria/oauth2/blob/54cca4aaaff6a095cbf1c8010f2fe2cc7de4e45a/src/Entity/SessionEntity.php#L160-L167
redaigbaria/oauth2
src/Entity/SessionEntity.php
SessionEntity.formatScopes
private function formatScopes($unformatted = []) { $scopes = []; if (is_array($unformatted)) { foreach ($unformatted as $scope) { if ($scope instanceof ScopeEntity) { $scopes[$scope->getId()] = $scope; } } } ...
php
private function formatScopes($unformatted = []) { $scopes = []; if (is_array($unformatted)) { foreach ($unformatted as $scope) { if ($scope instanceof ScopeEntity) { $scopes[$scope->getId()] = $scope; } } } ...
[ "private", "function", "formatScopes", "(", "$", "unformatted", "=", "[", "]", ")", "{", "$", "scopes", "=", "[", "]", ";", "if", "(", "is_array", "(", "$", "unformatted", ")", ")", "{", "foreach", "(", "$", "unformatted", "as", "$", "scope", ")", ...
Format the local scopes array @param \League\OAuth2\Server\Entity\Scope[] @return array
[ "Format", "the", "local", "scopes", "array" ]
train
https://github.com/redaigbaria/oauth2/blob/54cca4aaaff6a095cbf1c8010f2fe2cc7de4e45a/src/Entity/SessionEntity.php#L176-L188
redaigbaria/oauth2
src/Entity/SessionEntity.php
SessionEntity.getClient
public function getClient() { if ($this->client instanceof ClientEntity) { return $this->client; } $this->client = $this->server->getClientStorage()->getBySession($this); return $this->client; }
php
public function getClient() { if ($this->client instanceof ClientEntity) { return $this->client; } $this->client = $this->server->getClientStorage()->getBySession($this); return $this->client; }
[ "public", "function", "getClient", "(", ")", "{", "if", "(", "$", "this", "->", "client", "instanceof", "ClientEntity", ")", "{", "return", "$", "this", "->", "client", ";", "}", "$", "this", "->", "client", "=", "$", "this", "->", "server", "->", "g...
Return the session client @return \League\OAuth2\Server\Entity\ClientEntity
[ "Return", "the", "session", "client" ]
train
https://github.com/redaigbaria/oauth2/blob/54cca4aaaff6a095cbf1c8010f2fe2cc7de4e45a/src/Entity/SessionEntity.php#L237-L246
redaigbaria/oauth2
src/Entity/SessionEntity.php
SessionEntity.setOwner
public function setOwner($type, $id) { $this->ownerType = $type; $this->ownerId = $id; $this->server->getEventEmitter()->emit(new SessionOwnerEvent($this)); return $this; }
php
public function setOwner($type, $id) { $this->ownerType = $type; $this->ownerId = $id; $this->server->getEventEmitter()->emit(new SessionOwnerEvent($this)); return $this; }
[ "public", "function", "setOwner", "(", "$", "type", ",", "$", "id", ")", "{", "$", "this", "->", "ownerType", "=", "$", "type", ";", "$", "this", "->", "ownerId", "=", "$", "id", ";", "$", "this", "->", "server", "->", "getEventEmitter", "(", ")", ...
Set the session owner @param string $type The type of the owner (e.g. user, app) @param string $id The identifier of the owner @return self
[ "Set", "the", "session", "owner" ]
train
https://github.com/redaigbaria/oauth2/blob/54cca4aaaff6a095cbf1c8010f2fe2cc7de4e45a/src/Entity/SessionEntity.php#L256-L264
redaigbaria/oauth2
src/Entity/SessionEntity.php
SessionEntity.save
public function save() { // Save the session and get an identifier $id = $this->server->getSessionStorage()->create( $this->getOwnerType(), $this->getOwnerId(), $this->getClient()->getId(), $this->getClient()->getRedirectUri() ); $this...
php
public function save() { // Save the session and get an identifier $id = $this->server->getSessionStorage()->create( $this->getOwnerType(), $this->getOwnerId(), $this->getClient()->getId(), $this->getClient()->getRedirectUri() ); $this...
[ "public", "function", "save", "(", ")", "{", "// Save the session and get an identifier", "$", "id", "=", "$", "this", "->", "server", "->", "getSessionStorage", "(", ")", "->", "create", "(", "$", "this", "->", "getOwnerType", "(", ")", ",", "$", "this", ...
Save the session @return void
[ "Save", "the", "session" ]
train
https://github.com/redaigbaria/oauth2/blob/54cca4aaaff6a095cbf1c8010f2fe2cc7de4e45a/src/Entity/SessionEntity.php#L291-L307
ufocoder/yii2-SyncSocial
src/actions/SyncAction.php
SyncAction.run
public function run( $service ) { $flagConnect = $this->synchronizer->isConnected( $service ); if ( $flagConnect ) { $resultSync = $this->synchronizer->syncService( $service ); $successMessage = $resultSync['count'] == 0 ? Yii::t( 'SyncSocial', 'Service was suc...
php
public function run( $service ) { $flagConnect = $this->synchronizer->isConnected( $service ); if ( $flagConnect ) { $resultSync = $this->synchronizer->syncService( $service ); $successMessage = $resultSync['count'] == 0 ? Yii::t( 'SyncSocial', 'Service was suc...
[ "public", "function", "run", "(", "$", "service", ")", "{", "$", "flagConnect", "=", "$", "this", "->", "synchronizer", "->", "isConnected", "(", "$", "service", ")", ";", "if", "(", "$", "flagConnect", ")", "{", "$", "resultSync", "=", "$", "this", ...
@param $service @return \yii\web\Response
[ "@param", "$service" ]
train
https://github.com/ufocoder/yii2-SyncSocial/blob/2dbaaec2dad782c52fdd5b648a31ba7fe2a75e1b/src/actions/SyncAction.php#L18-L44
webforge-labs/psc-cms
lib/Psc/UI/DropBox2.php
DropBox2.convertButtons
protected function convertButtons() { $buttons = array(); $snippets = array(); if (isset($this->assignedValues)) { foreach ($this->assignedValues as $item) { if ($item instanceof \Psc\UI\ButtonInterface) { $button = $item; } elseif ($item instanceof \Psc\CMS\Entity) { ...
php
protected function convertButtons() { $buttons = array(); $snippets = array(); if (isset($this->assignedValues)) { foreach ($this->assignedValues as $item) { if ($item instanceof \Psc\UI\ButtonInterface) { $button = $item; } elseif ($item instanceof \Psc\CMS\Entity) { ...
[ "protected", "function", "convertButtons", "(", ")", "{", "$", "buttons", "=", "array", "(", ")", ";", "$", "snippets", "=", "array", "(", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "assignedValues", ")", ")", "{", "foreach", "(", "$", "...
Wandelt die assignedValues in Buttons um die JooseSnippets werden gesammelt, wenn sie extrahierbar sind @return list($buttons, $snippets)
[ "Wandelt", "die", "assignedValues", "in", "Buttons", "um" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/UI/DropBox2.php#L115-L150
atkrad/data-tables
src/Render.php
Render.getConfig
protected function getConfig() { if (!$this->table->getDataSource() instanceof Dom) { $this->prepareColumnsConfig(); } $this->prepareExtensionsConfig(); $config = []; $config += $this->table->getProperties(); return json_encode($config); }
php
protected function getConfig() { if (!$this->table->getDataSource() instanceof Dom) { $this->prepareColumnsConfig(); } $this->prepareExtensionsConfig(); $config = []; $config += $this->table->getProperties(); return json_encode($config); }
[ "protected", "function", "getConfig", "(", ")", "{", "if", "(", "!", "$", "this", "->", "table", "->", "getDataSource", "(", ")", "instanceof", "Dom", ")", "{", "$", "this", "->", "prepareColumnsConfig", "(", ")", ";", "}", "$", "this", "->", "prepareE...
Get config @return string
[ "Get", "config" ]
train
https://github.com/atkrad/data-tables/blob/5afcc337ab624ca626e29d9674459c5105982b16/src/Render.php#L120-L131
atkrad/data-tables
src/Render.php
Render.prepareColumnsConfig
protected function prepareColumnsConfig() { $columns = []; foreach ($this->table->getColumns() as $column) { $columns[] = $column->getProperties(); } $this->table->setColumns($columns); }
php
protected function prepareColumnsConfig() { $columns = []; foreach ($this->table->getColumns() as $column) { $columns[] = $column->getProperties(); } $this->table->setColumns($columns); }
[ "protected", "function", "prepareColumnsConfig", "(", ")", "{", "$", "columns", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "table", "->", "getColumns", "(", ")", "as", "$", "column", ")", "{", "$", "columns", "[", "]", "=", "$", "column",...
Prepare columns config
[ "Prepare", "columns", "config" ]
train
https://github.com/atkrad/data-tables/blob/5afcc337ab624ca626e29d9674459c5105982b16/src/Render.php#L136-L145
atkrad/data-tables
src/Render.php
Render.prepareExtensionsConfig
protected function prepareExtensionsConfig() { foreach ($this->table->getExtensions() as $extension) { $properties = $extension->getProperties(); if (isset($properties)) { $this->table->setProperty($extension->getPropertyName(), $properties); } } ...
php
protected function prepareExtensionsConfig() { foreach ($this->table->getExtensions() as $extension) { $properties = $extension->getProperties(); if (isset($properties)) { $this->table->setProperty($extension->getPropertyName(), $properties); } } ...
[ "protected", "function", "prepareExtensionsConfig", "(", ")", "{", "foreach", "(", "$", "this", "->", "table", "->", "getExtensions", "(", ")", "as", "$", "extension", ")", "{", "$", "properties", "=", "$", "extension", "->", "getProperties", "(", ")", ";"...
Prepare extensions config
[ "Prepare", "extensions", "config" ]
train
https://github.com/atkrad/data-tables/blob/5afcc337ab624ca626e29d9674459c5105982b16/src/Render.php#L150-L158
CakeCMS/Core
src/Path/Path.php
Path.dirs
public function dirs($resource, $recursive = false, $filter = null) { return $this->ls($resource, self::LS_MODE_DIR, $recursive, $filter); }
php
public function dirs($resource, $recursive = false, $filter = null) { return $this->ls($resource, self::LS_MODE_DIR, $recursive, $filter); }
[ "public", "function", "dirs", "(", "$", "resource", ",", "$", "recursive", "=", "false", ",", "$", "filter", "=", "null", ")", "{", "return", "$", "this", "->", "ls", "(", "$", "resource", ",", "self", "::", "LS_MODE_DIR", ",", "$", "recursive", ",",...
Get a list of directories from a resource. @param string $resource @param bool $recursive @param null $filter @return mixed
[ "Get", "a", "list", "of", "directories", "from", "a", "resource", "." ]
train
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Path/Path.php#L50-L53
CakeCMS/Core
src/Path/Path.php
Path.url
public function url($source, $full = true) { $stamp = Configure::read('Asset.timestamp'); $url = parent::url($source, $full); if ($url !== null && $stamp && strpos($url, '?') === false) { $fullPath = $this->get($source); $url .= '?' . @filemtime($fullPath); }...
php
public function url($source, $full = true) { $stamp = Configure::read('Asset.timestamp'); $url = parent::url($source, $full); if ($url !== null && $stamp && strpos($url, '?') === false) { $fullPath = $this->get($source); $url .= '?' . @filemtime($fullPath); }...
[ "public", "function", "url", "(", "$", "source", ",", "$", "full", "=", "true", ")", "{", "$", "stamp", "=", "Configure", "::", "read", "(", "'Asset.timestamp'", ")", ";", "$", "url", "=", "parent", "::", "url", "(", "$", "source", ",", "$", "full"...
Get url to a file. @param string $source @param bool $full @return null|string
[ "Get", "url", "to", "a", "file", "." ]
train
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Path/Path.php#L62-L73
CakeCMS/Core
src/Path/Path.php
Path.getInstance
public static function getInstance($key = 'default') { if ((string) $key = '') { throw new Exception('Invalid object key'); } if (!Arr::key($key, self::$_objects)) { self::$_objects[$key] = new self(); } return self::$_objects[$key]; }
php
public static function getInstance($key = 'default') { if ((string) $key = '') { throw new Exception('Invalid object key'); } if (!Arr::key($key, self::$_objects)) { self::$_objects[$key] = new self(); } return self::$_objects[$key]; }
[ "public", "static", "function", "getInstance", "(", "$", "key", "=", "'default'", ")", "{", "if", "(", "(", "string", ")", "$", "key", "=", "''", ")", "{", "throw", "new", "Exception", "(", "'Invalid object key'", ")", ";", "}", "if", "(", "!", "Arr"...
Get path instance. @param string $key @return Path @throws Exception
[ "Get", "path", "instance", "." ]
train
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Path/Path.php#L82-L93
CakeCMS/Core
src/Path/Path.php
Path.ls
public function ls($resource, $mode = self::LS_MODE_FILE, $recursive = false, $filter = null) { $files = []; list (, $paths, $path) = $this->_parse($resource); foreach ((array) $paths as $_path) { if (file_exists($_path . '/' . $path)) { foreach ($this->_list(FS:...
php
public function ls($resource, $mode = self::LS_MODE_FILE, $recursive = false, $filter = null) { $files = []; list (, $paths, $path) = $this->_parse($resource); foreach ((array) $paths as $_path) { if (file_exists($_path . '/' . $path)) { foreach ($this->_list(FS:...
[ "public", "function", "ls", "(", "$", "resource", ",", "$", "mode", "=", "self", "::", "LS_MODE_FILE", ",", "$", "recursive", "=", "false", ",", "$", "filter", "=", "null", ")", "{", "$", "files", "=", "[", "]", ";", "list", "(", ",", "$", "paths...
Get a list of files or diretories from a resource. @param string $resource @param string $mode @param bool $recursive @param null $filter @return array @SuppressWarnings(PHPMD.ShortMethodName)
[ "Get", "a", "list", "of", "files", "or", "diretories", "from", "a", "resource", "." ]
train
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Path/Path.php#L105-L121
CakeCMS/Core
src/Path/Path.php
Path._list
protected function _list($path, $prefix = '', $mode = 'file', $recursive = false, $filter = null) { $files = []; $ignore = ['.', '..', '.DS_Store', '.svn', '.git', '.gitignore', '.gitmodules', 'cgi-bin']; if ($scan = @scandir($path)) { foreach ($scan as $file) { ...
php
protected function _list($path, $prefix = '', $mode = 'file', $recursive = false, $filter = null) { $files = []; $ignore = ['.', '..', '.DS_Store', '.svn', '.git', '.gitignore', '.gitmodules', 'cgi-bin']; if ($scan = @scandir($path)) { foreach ($scan as $file) { ...
[ "protected", "function", "_list", "(", "$", "path", ",", "$", "prefix", "=", "''", ",", "$", "mode", "=", "'file'", ",", "$", "recursive", "=", "false", ",", "$", "filter", "=", "null", ")", "{", "$", "files", "=", "[", "]", ";", "$", "ignore", ...
Get the list of files or directories in a given path. @param string $path @param string $prefix @param string $mode @param bool $recursive @param null $filter @return array @SuppressWarnings(PHPMD.CyclomaticComplexity)
[ "Get", "the", "list", "of", "files", "or", "directories", "in", "a", "given", "path", "." ]
train
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Path/Path.php#L134-L183
dandisy/laravel-generator
src/Generators/ModelGenerator.php
ModelGenerator.getPHPDocType
private function getPHPDocType($db_type, $relation = null) { switch ($db_type) { case 'datetime': return 'string|\Carbon\Carbon'; case 'text': return 'string'; case '1t1': case 'mt1': return '\\'.$this->commandDa...
php
private function getPHPDocType($db_type, $relation = null) { switch ($db_type) { case 'datetime': return 'string|\Carbon\Carbon'; case 'text': return 'string'; case '1t1': case 'mt1': return '\\'.$this->commandDa...
[ "private", "function", "getPHPDocType", "(", "$", "db_type", ",", "$", "relation", "=", "null", ")", "{", "switch", "(", "$", "db_type", ")", "{", "case", "'datetime'", ":", "return", "'string|\\Carbon\\Carbon'", ";", "case", "'text'", ":", "return", "'strin...
@param $db_type @param GeneratorFieldRelation|null $relation @return string
[ "@param", "$db_type", "@param", "GeneratorFieldRelation|null", "$relation" ]
train
https://github.com/dandisy/laravel-generator/blob/742797c8483bc88b54b6302a516a9a85eeb8579b/src/Generators/ModelGenerator.php#L152-L170
webforge-labs/psc-cms
lib/Psc/Doctrine/EntityRelationMeta.php
EntityRelationMeta.getPropertyName
public function getPropertyName() { if (isset($this->propertyName)) return $this->propertyName; if ($this->valueType === self::COLLECTION_VALUED) { // plural muss nach außen, sonst machen wir aus OIDs => oiDs , soll aber oids sein return Inflector::plural($this->inflector->propertyName($t...
php
public function getPropertyName() { if (isset($this->propertyName)) return $this->propertyName; if ($this->valueType === self::COLLECTION_VALUED) { // plural muss nach außen, sonst machen wir aus OIDs => oiDs , soll aber oids sein return Inflector::plural($this->inflector->propertyName($t...
[ "public", "function", "getPropertyName", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "propertyName", ")", ")", "return", "$", "this", "->", "propertyName", ";", "if", "(", "$", "this", "->", "valueType", "===", "self", "::", "COLLECTION_VA...
Gibt den PHP-Property-Namen für die Entity-Klasse zurück
[ "Gibt", "den", "PHP", "-", "Property", "-", "Namen", "für", "die", "Entity", "-", "Klasse", "zurück" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/EntityRelationMeta.php#L96-L106
webforge-labs/psc-cms
lib/Psc/Doctrine/EntityRelationMeta.php
EntityRelationMeta.getParamName
public function getParamName() { if (isset($this->paramName)) { return $this->paramName; } return $this->inflector->propertyName($this->getName()); }
php
public function getParamName() { if (isset($this->paramName)) { return $this->paramName; } return $this->inflector->propertyName($this->getName()); }
[ "public", "function", "getParamName", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "paramName", ")", ")", "{", "return", "$", "this", "->", "paramName", ";", "}", "return", "$", "this", "->", "inflector", "->", "propertyName", "(", "$", ...
Gibt den PHP Parameter Namen für das Relation Interface das ist quasi der selbe wie der ProperytName jedoch ist dieser immer singular OID => oid OIDMeta => oidMeta SomeClassName => someClassName @return string immer in Singular und in property-kleinschreibweise
[ "Gibt", "den", "PHP", "Parameter", "Namen", "für", "das", "Relation", "Interface" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/EntityRelationMeta.php#L118-L124
webforge-labs/psc-cms
lib/Psc/Doctrine/EntityRelationMeta.php
EntityRelationMeta.getMethodName
public function getMethodName($singularOrPlural = 'singular') { if (!isset($singularOrPlural)) { $singularOrPlural = $this->getValueType() === self::COLLECTION_VALUED ? 'plural' : 'singular'; } if (!isset($this->methodName)) { $this->methodName = array( $this->getName(), Inf...
php
public function getMethodName($singularOrPlural = 'singular') { if (!isset($singularOrPlural)) { $singularOrPlural = $this->getValueType() === self::COLLECTION_VALUED ? 'plural' : 'singular'; } if (!isset($this->methodName)) { $this->methodName = array( $this->getName(), Inf...
[ "public", "function", "getMethodName", "(", "$", "singularOrPlural", "=", "'singular'", ")", "{", "if", "(", "!", "isset", "(", "$", "singularOrPlural", ")", ")", "{", "$", "singularOrPlural", "=", "$", "this", "->", "getValueType", "(", ")", "===", "self"...
Gibt den Namen für die Methoden des Relation Interfaces zurück z.B. wird dann verwendet als OID addOID, removeOID, getOIDs OIDMeta addOIDMeta, setOIDMeta SomeClassName addSomeClassName, removeSomeClassName, setSomeClassNames usw @return string
[ "Gibt", "den", "Namen", "für", "die", "Methoden", "des", "Relation", "Interfaces", "zurück" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/EntityRelationMeta.php#L137-L150
webforge-labs/psc-cms
lib/Psc/Doctrine/EntityRelationMeta.php
EntityRelationMeta.setAlias
public function setAlias($name) { $fc = mb_substr($name,0,1); if (!$fc === mb_strtoupper($fc)) { throw new \InvalidArgumentException('SetAlias braucht als Parameter den Alias als wäre er ein großgeschriebener KlassenName. '.Code::varInfo($name)); } $this->alias = $name; return $this; }
php
public function setAlias($name) { $fc = mb_substr($name,0,1); if (!$fc === mb_strtoupper($fc)) { throw new \InvalidArgumentException('SetAlias braucht als Parameter den Alias als wäre er ein großgeschriebener KlassenName. '.Code::varInfo($name)); } $this->alias = $name; return $this; }
[ "public", "function", "setAlias", "(", "$", "name", ")", "{", "$", "fc", "=", "mb_substr", "(", "$", "name", ",", "0", ",", "1", ")", ";", "if", "(", "!", "$", "fc", "===", "mb_strtoupper", "(", "$", "fc", ")", ")", "{", "throw", "new", "\\", ...
Setzt Param, Property und Method Name mit dem Alias @param string $name der Alias in Klassen-GroßSchreibweise z.b. HeadlineSound
[ "Setzt", "Param", "Property", "und", "Method", "Name", "mit", "dem", "Alias" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/EntityRelationMeta.php#L176-L184
webforge-labs/psc-cms
lib/Psc/Doctrine/EntityRelationMeta.php
EntityRelationMeta.getPropertyType
public function getPropertyType() { if ($this->valueType === self::COLLECTION_VALUED) { return new PersistentCollectionType($this->gClass); } else { return new EntityType($this->gClass); } }
php
public function getPropertyType() { if ($this->valueType === self::COLLECTION_VALUED) { return new PersistentCollectionType($this->gClass); } else { return new EntityType($this->gClass); } }
[ "public", "function", "getPropertyType", "(", ")", "{", "if", "(", "$", "this", "->", "valueType", "===", "self", "::", "COLLECTION_VALUED", ")", "{", "return", "new", "PersistentCollectionType", "(", "$", "this", "->", "gClass", ")", ";", "}", "else", "{"...
Gibt den Typ des Properties in der Entity-Klasse zurück @return Webforge\Types\Type
[ "Gibt", "den", "Typ", "des", "Properties", "in", "der", "Entity", "-", "Klasse", "zurück" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/EntityRelationMeta.php#L195-L201
uthando-cms/uthando-dompdf
src/UthandoDomPdf/View/Strategy/PdfStrategy.php
PdfStrategy.attach
public function attach(EventManagerInterface $events, $priority = 1) { $this->listeners[] = $events->attach(ViewEvent::EVENT_RENDERER, array($this, 'selectRenderer'), $priority); $this->listeners[] = $events->attach(ViewEvent::EVENT_RESPONSE, array($this, 'injectResponse'), $priority); }
php
public function attach(EventManagerInterface $events, $priority = 1) { $this->listeners[] = $events->attach(ViewEvent::EVENT_RENDERER, array($this, 'selectRenderer'), $priority); $this->listeners[] = $events->attach(ViewEvent::EVENT_RESPONSE, array($this, 'injectResponse'), $priority); }
[ "public", "function", "attach", "(", "EventManagerInterface", "$", "events", ",", "$", "priority", "=", "1", ")", "{", "$", "this", "->", "listeners", "[", "]", "=", "$", "events", "->", "attach", "(", "ViewEvent", "::", "EVENT_RENDERER", ",", "array", "...
Attach the aggregate to the specified event manager @param EventManagerInterface $events @param int $priority @return void
[ "Attach", "the", "aggregate", "to", "the", "specified", "event", "manager" ]
train
https://github.com/uthando-cms/uthando-dompdf/blob/60a750058c2db9ed167476192b20c7f544c32007/src/UthandoDomPdf/View/Strategy/PdfStrategy.php#L52-L56
uthando-cms/uthando-dompdf
src/UthandoDomPdf/View/Strategy/PdfStrategy.php
PdfStrategy.selectRenderer
public function selectRenderer(ViewEvent $e) { $model = $e->getModel(); if ($model instanceof Model\PdfModel) { return $this->renderer; } return; }
php
public function selectRenderer(ViewEvent $e) { $model = $e->getModel(); if ($model instanceof Model\PdfModel) { return $this->renderer; } return; }
[ "public", "function", "selectRenderer", "(", "ViewEvent", "$", "e", ")", "{", "$", "model", "=", "$", "e", "->", "getModel", "(", ")", ";", "if", "(", "$", "model", "instanceof", "Model", "\\", "PdfModel", ")", "{", "return", "$", "this", "->", "rend...
Detect if we should use the PdfRenderer based on model type @param ViewEvent $e @return null|PdfRenderer
[ "Detect", "if", "we", "should", "use", "the", "PdfRenderer", "based", "on", "model", "type" ]
train
https://github.com/uthando-cms/uthando-dompdf/blob/60a750058c2db9ed167476192b20c7f544c32007/src/UthandoDomPdf/View/Strategy/PdfStrategy.php#L64-L73
VincentChalnot/SidusAdminBundle
DataGrid/DataGridHelper.php
DataGridHelper.getDataGridConfigCode
public function getDataGridConfigCode(Action $action): string { // Check if datagrid code is set in options return $action->getOption( 'datagrid', $action->getAdmin()->getOption( 'datagrid', $action->getAdmin()->getCode() // Fallback to admin c...
php
public function getDataGridConfigCode(Action $action): string { // Check if datagrid code is set in options return $action->getOption( 'datagrid', $action->getAdmin()->getOption( 'datagrid', $action->getAdmin()->getCode() // Fallback to admin c...
[ "public", "function", "getDataGridConfigCode", "(", "Action", "$", "action", ")", ":", "string", "{", "// Check if datagrid code is set in options", "return", "$", "action", "->", "getOption", "(", "'datagrid'", ",", "$", "action", "->", "getAdmin", "(", ")", "->"...
@param Action $action @return string
[ "@param", "Action", "$action" ]
train
https://github.com/VincentChalnot/SidusAdminBundle/blob/3366f3f1525435860cf275ed2f1f0b58cf6eea18/DataGrid/DataGridHelper.php#L61-L71
VincentChalnot/SidusAdminBundle
DataGrid/DataGridHelper.php
DataGridHelper.getDataGrid
public function getDataGrid(Action $action): DataGrid { return $this->dataGridRegistry->getDataGrid($this->getDataGridConfigCode($action)); }
php
public function getDataGrid(Action $action): DataGrid { return $this->dataGridRegistry->getDataGrid($this->getDataGridConfigCode($action)); }
[ "public", "function", "getDataGrid", "(", "Action", "$", "action", ")", ":", "DataGrid", "{", "return", "$", "this", "->", "dataGridRegistry", "->", "getDataGrid", "(", "$", "this", "->", "getDataGridConfigCode", "(", "$", "action", ")", ")", ";", "}" ]
@param Action $action @return DataGrid
[ "@param", "Action", "$action" ]
train
https://github.com/VincentChalnot/SidusAdminBundle/blob/3366f3f1525435860cf275ed2f1f0b58cf6eea18/DataGrid/DataGridHelper.php#L78-L81
VincentChalnot/SidusAdminBundle
DataGrid/DataGridHelper.php
DataGridHelper.bindDataGridRequest
public function bindDataGridRequest( Action $action, Request $request, DataGrid $dataGrid = null, array $formOptions = [] ): DataGrid { $dataGrid = $this->buildDataGridForm($action, $request, $dataGrid, $formOptions); $dataGrid->handleRequest($request); retur...
php
public function bindDataGridRequest( Action $action, Request $request, DataGrid $dataGrid = null, array $formOptions = [] ): DataGrid { $dataGrid = $this->buildDataGridForm($action, $request, $dataGrid, $formOptions); $dataGrid->handleRequest($request); retur...
[ "public", "function", "bindDataGridRequest", "(", "Action", "$", "action", ",", "Request", "$", "request", ",", "DataGrid", "$", "dataGrid", "=", "null", ",", "array", "$", "formOptions", "=", "[", "]", ")", ":", "DataGrid", "{", "$", "dataGrid", "=", "$...
@param Action $action @param Request $request @param DataGrid|null $dataGrid @param array $formOptions @return DataGrid
[ "@param", "Action", "$action", "@param", "Request", "$request", "@param", "DataGrid|null", "$dataGrid", "@param", "array", "$formOptions" ]
train
https://github.com/VincentChalnot/SidusAdminBundle/blob/3366f3f1525435860cf275ed2f1f0b58cf6eea18/DataGrid/DataGridHelper.php#L91-L101
VincentChalnot/SidusAdminBundle
DataGrid/DataGridHelper.php
DataGridHelper.buildDataGridForm
public function buildDataGridForm( Action $action, Request $request, DataGrid $dataGrid = null, array $formOptions = [] ): DataGrid { if (null === $dataGrid) { $dataGrid = $this->getDataGrid($action); } $formOptions = array_merge( [ ...
php
public function buildDataGridForm( Action $action, Request $request, DataGrid $dataGrid = null, array $formOptions = [] ): DataGrid { if (null === $dataGrid) { $dataGrid = $this->getDataGrid($action); } $formOptions = array_merge( [ ...
[ "public", "function", "buildDataGridForm", "(", "Action", "$", "action", ",", "Request", "$", "request", ",", "DataGrid", "$", "dataGrid", "=", "null", ",", "array", "$", "formOptions", "=", "[", "]", ")", ":", "DataGrid", "{", "if", "(", "null", "===", ...
@param Action $action @param Request $request @param DataGrid|null $dataGrid @param array $formOptions @return DataGrid
[ "@param", "Action", "$action", "@param", "Request", "$request", "@param", "DataGrid|null", "$dataGrid", "@param", "array", "$formOptions" ]
train
https://github.com/VincentChalnot/SidusAdminBundle/blob/3366f3f1525435860cf275ed2f1f0b58cf6eea18/DataGrid/DataGridHelper.php#L111-L135
zodream/thirdparty
src/API/Search.php
Search.putBaiDu
public function putBaiDu(array $urls) { return $this->getBaiDu()->setHeader([ 'Content-Type' => 'text/plain' ])->parameters($this->merge([ 'urls' => $urls ]))->encode(function ($data) { return implode("\n", $data['urls']); })->json(); }
php
public function putBaiDu(array $urls) { return $this->getBaiDu()->setHeader([ 'Content-Type' => 'text/plain' ])->parameters($this->merge([ 'urls' => $urls ]))->encode(function ($data) { return implode("\n", $data['urls']); })->json(); }
[ "public", "function", "putBaiDu", "(", "array", "$", "urls", ")", "{", "return", "$", "this", "->", "getBaiDu", "(", ")", "->", "setHeader", "(", "[", "'Content-Type'", "=>", "'text/plain'", "]", ")", "->", "parameters", "(", "$", "this", "->", "merge", ...
INITIATIVE PUT URLS TO BAIDU @param array $urls @return array @throws \Exception
[ "INITIATIVE", "PUT", "URLS", "TO", "BAIDU" ]
train
https://github.com/zodream/thirdparty/blob/b9d39087913850f1c5c7c9165105fec22a128f8f/src/API/Search.php#L29-L37
phpmob/changmin
src/PhpMob/ChangMinBundle/Twig/Extension/SortByExtension.php
SortByExtension.sortBy
public function sortBy($array, $field, $order = 'ASC') { if ($array instanceof Collection) { $array = $array->toArray(); } if (1 >= count($array)) { return $array; } usort( $array, function ($firstElement, $secondElement) use (...
php
public function sortBy($array, $field, $order = 'ASC') { if ($array instanceof Collection) { $array = $array->toArray(); } if (1 >= count($array)) { return $array; } usort( $array, function ($firstElement, $secondElement) use (...
[ "public", "function", "sortBy", "(", "$", "array", ",", "$", "field", ",", "$", "order", "=", "'ASC'", ")", "{", "if", "(", "$", "array", "instanceof", "Collection", ")", "{", "$", "array", "=", "$", "array", "->", "toArray", "(", ")", ";", "}", ...
@param array|Collection $array @param string $field @param string $order @return array @throws NoSuchPropertyException
[ "@param", "array|Collection", "$array", "@param", "string", "$field", "@param", "string", "$order" ]
train
https://github.com/phpmob/changmin/blob/bfebb1561229094d1c138574abab75f2f1d17d66/src/PhpMob/ChangMinBundle/Twig/Extension/SortByExtension.php#L44-L71
parsnick/steak
src/Boot/RegisterCoreBindings.php
RegisterCoreBindings.boot
public function boot(Container $app) { $app->singleton('files', Filesystem::class); $app->singleton('events', function ($app) { return new Dispatcher($app); }); $app->bind(Builder::class, function ($app) { return new Builder($app, $app['config']['build.pipel...
php
public function boot(Container $app) { $app->singleton('files', Filesystem::class); $app->singleton('events', function ($app) { return new Dispatcher($app); }); $app->bind(Builder::class, function ($app) { return new Builder($app, $app['config']['build.pipel...
[ "public", "function", "boot", "(", "Container", "$", "app", ")", "{", "$", "app", "->", "singleton", "(", "'files'", ",", "Filesystem", "::", "class", ")", ";", "$", "app", "->", "singleton", "(", "'events'", ",", "function", "(", "$", "app", ")", "{...
Set up required container bindings. @param Container $app
[ "Set", "up", "required", "container", "bindings", "." ]
train
https://github.com/parsnick/steak/blob/461869189a640938438187330f6c50aca97c5ccc/src/Boot/RegisterCoreBindings.php#L22-L49
chocoboxxf/yii2-alidayu-sdk
src/Alidayu.php
Alidayu.AxbBind
public function AxbBind($phoneA, $phoneB, $endDate, $otherCall = false, $needRecord = false) { // 公共参数 $data = [ 'app_key' => $this->appKey, 'timestamp' => $this->getTimestamp(), 'format' => $this->format, 'v' => $this->appVersion, 'sign_me...
php
public function AxbBind($phoneA, $phoneB, $endDate, $otherCall = false, $needRecord = false) { // 公共参数 $data = [ 'app_key' => $this->appKey, 'timestamp' => $this->getTimestamp(), 'format' => $this->format, 'v' => $this->appVersion, 'sign_me...
[ "public", "function", "AxbBind", "(", "$", "phoneA", ",", "$", "phoneB", ",", "$", "endDate", ",", "$", "otherCall", "=", "false", ",", "$", "needRecord", "=", "false", ")", "{", "// 公共参数", "$", "data", "=", "[", "'app_key'", "=>", "$", "this", "->",...
AXB(AXN)一次绑定接口 绑定接口用于实现真实号码和虚拟号码之间的绑定关系,只有在完成绑定以后用户才可以使用虚拟号码的基本通信能力。 @param string $phoneA 号码A @param string $phoneB 号码B(AXB模式下必填,AXN模式下任意填写) @param string $endDate 到期自动解绑时间(YYYY-mm-dd HH:MM:SS) @param bool|false $otherCall 第三方是否可拨打X转接到号码A @param bool|false $needRecord 是否需要录音 @return mixed @throws GuzzleException
[ "AXB", "(", "AXN", ")", "一次绑定接口", "绑定接口用于实现真实号码和虚拟号码之间的绑定关系,只有在完成绑定以后用户才可以使用虚拟号码的基本通信能力。" ]
train
https://github.com/chocoboxxf/yii2-alidayu-sdk/blob/47cbc4f5ac1e9378ae4ec4765bdd8802cac9e22f/src/Alidayu.php#L136-L161
chocoboxxf/yii2-alidayu-sdk
src/Alidayu.php
Alidayu.AxbBindSecond
public function AxbBindSecond($subsId, $phoneB, $endDate, $otherCall = false, $needRecord = false) { // 公共参数 $data = [ 'app_key' => $this->appKey, 'timestamp' => $this->getTimestamp(), 'format' => $this->format, 'v' => $this->appVersion, 's...
php
public function AxbBindSecond($subsId, $phoneB, $endDate, $otherCall = false, $needRecord = false) { // 公共参数 $data = [ 'app_key' => $this->appKey, 'timestamp' => $this->getTimestamp(), 'format' => $this->format, 'v' => $this->appVersion, 's...
[ "public", "function", "AxbBindSecond", "(", "$", "subsId", ",", "$", "phoneB", ",", "$", "endDate", ",", "$", "otherCall", "=", "false", ",", "$", "needRecord", "=", "false", ")", "{", "// 公共参数", "$", "data", "=", "[", "'app_key'", "=>", "$", "this", ...
AXN二次绑定接口 二次绑定接口用户确认,AX与B之间的关系,在一次绑定接口调用的基础上,再通过调用二次绑定接口,最终形成A与B之间的关系。 @param string $subsId 绑定关系ID @param string $phoneB 号码B @param string $endDate 到期自动解绑时间(YYYY-mm-dd HH:MM:SS) @param bool|false $otherCall 第三方是否可拨打X转接到号码A @param bool|false $needRecord 是否需要录音 @return mixed @throws GuzzleException
[ "AXN二次绑定接口", "二次绑定接口用户确认,AX与B之间的关系,在一次绑定接口调用的基础上,再通过调用二次绑定接口,最终形成A与B之间的关系。" ]
train
https://github.com/chocoboxxf/yii2-alidayu-sdk/blob/47cbc4f5ac1e9378ae4ec4765bdd8802cac9e22f/src/Alidayu.php#L174-L199
chocoboxxf/yii2-alidayu-sdk
src/Alidayu.php
Alidayu.AxbUnbind
public function AxbUnbind($subsId) { // 公共参数 $data = [ 'app_key' => $this->appKey, 'timestamp' => $this->getTimestamp(), 'format' => $this->format, 'v' => $this->appVersion, 'sign_method' => $this->signMethod, 'method' => Aliday...
php
public function AxbUnbind($subsId) { // 公共参数 $data = [ 'app_key' => $this->appKey, 'timestamp' => $this->getTimestamp(), 'format' => $this->format, 'v' => $this->appVersion, 'sign_method' => $this->signMethod, 'method' => Aliday...
[ "public", "function", "AxbUnbind", "(", "$", "subsId", ")", "{", "// 公共参数", "$", "data", "=", "[", "'app_key'", "=>", "$", "this", "->", "appKey", ",", "'timestamp'", "=>", "$", "this", "->", "getTimestamp", "(", ")", ",", "'format'", "=>", "$", "this"...
AXB(AXN)关系解绑接口 通过该接口,实现AXB三元关系的解绑,解绑过后,再通过呼叫X,将不能找到A或者B。 @param string $subsId 绑定关系ID @return mixed @throws GuzzleException
[ "AXB", "(", "AXN", ")", "关系解绑接口", "通过该接口,实现AXB三元关系的解绑,解绑过后,再通过呼叫X,将不能找到A或者B。" ]
train
https://github.com/chocoboxxf/yii2-alidayu-sdk/blob/47cbc4f5ac1e9378ae4ec4765bdd8802cac9e22f/src/Alidayu.php#L208-L229
chocoboxxf/yii2-alidayu-sdk
src/Alidayu.php
Alidayu.smsSend
public function smsSend($recNum, $templateCode, $signName, $smsType = 'normal', $param = [], $extend = '') { // 公共参数 $data = [ 'app_key' => $this->appKey, 'timestamp' => $this->getTimestamp(), 'format' => $this->format, 'v' => $this->appVersion, ...
php
public function smsSend($recNum, $templateCode, $signName, $smsType = 'normal', $param = [], $extend = '') { // 公共参数 $data = [ 'app_key' => $this->appKey, 'timestamp' => $this->getTimestamp(), 'format' => $this->format, 'v' => $this->appVersion, ...
[ "public", "function", "smsSend", "(", "$", "recNum", ",", "$", "templateCode", ",", "$", "signName", ",", "$", "smsType", "=", "'normal'", ",", "$", "param", "=", "[", "]", ",", "$", "extend", "=", "''", ")", "{", "// 公共参数", "$", "data", "=", "[", ...
短信发送 @param string $recNum 短信接收号码。支持单个或多个手机号码,群发短信需传入多个号码,以英文逗号分隔,一次调用最多传入200个号码。 @param string $templateCode 短信模板ID,传入的模板必须是在阿里大于“管理中心-短信模板管理”中的可用模板。 @param string $signName 短信签名,传入的短信签名必须是在阿里大于“管理中心-短信签名管理”中的可用签名。 @param string $smsType 短信类型,传入值请填写normal @param array $param 短信模板变量,传参规则{"key":"value"},key的名字须和申请模板中的变量...
[ "短信发送" ]
train
https://github.com/chocoboxxf/yii2-alidayu-sdk/blob/47cbc4f5ac1e9378ae4ec4765bdd8802cac9e22f/src/Alidayu.php#L242-L271
chocoboxxf/yii2-alidayu-sdk
src/Alidayu.php
Alidayu.smsQuery
public function smsQuery($recNum, $queryDate, $currentPage = 1, $pageSize = 50, $bizId = '') { // 公共参数 $data = [ 'app_key' => $this->appKey, 'timestamp' => $this->getTimestamp(), 'format' => $this->format, 'v' => $this->appVersion, 'sign_me...
php
public function smsQuery($recNum, $queryDate, $currentPage = 1, $pageSize = 50, $bizId = '') { // 公共参数 $data = [ 'app_key' => $this->appKey, 'timestamp' => $this->getTimestamp(), 'format' => $this->format, 'v' => $this->appVersion, 'sign_me...
[ "public", "function", "smsQuery", "(", "$", "recNum", ",", "$", "queryDate", ",", "$", "currentPage", "=", "1", ",", "$", "pageSize", "=", "50", ",", "$", "bizId", "=", "''", ")", "{", "// 公共参数", "$", "data", "=", "[", "'app_key'", "=>", "$", "this...
短信发送记录查询 @param string $recNum 短信接收号码 @param string $queryDate 短信发送日期,支持近30天记录查询,格式yyyyMMdd @param int $currentPage 分页参数,页码 @param int $pageSize 分页参数,每页数量。最大值50 @param string $bizId 短信发送流水,同发送结果中model值 @return mixed @throws GuzzleException
[ "短信发送记录查询" ]
train
https://github.com/chocoboxxf/yii2-alidayu-sdk/blob/47cbc4f5ac1e9378ae4ec4765bdd8802cac9e22f/src/Alidayu.php#L283-L309
chocoboxxf/yii2-alidayu-sdk
src/Alidayu.php
Alidayu.ttsSingleCall
public function ttsSingleCall($calledNum, $ttsCode, $calledShowNum, $param = [], $extend = '') { // 公共参数 $data = [ 'app_key' => $this->appKey, 'timestamp' => $this->getTimestamp(), 'format' => $this->format, 'v' => $this->appVersion, 'sign_...
php
public function ttsSingleCall($calledNum, $ttsCode, $calledShowNum, $param = [], $extend = '') { // 公共参数 $data = [ 'app_key' => $this->appKey, 'timestamp' => $this->getTimestamp(), 'format' => $this->format, 'v' => $this->appVersion, 'sign_...
[ "public", "function", "ttsSingleCall", "(", "$", "calledNum", ",", "$", "ttsCode", ",", "$", "calledShowNum", ",", "$", "param", "=", "[", "]", ",", "$", "extend", "=", "''", ")", "{", "// 公共参数", "$", "data", "=", "[", "'app_key'", "=>", "$", "this",...
文本转语音通知 @param string $calledNum 被叫号码,支持国内手机号与固话号码 @param string $ttsCode TTS模板ID,传入的模板必须是在阿里大于“管理中心-语音TTS模板管理”中的可用模板 @param string $calledShowNum 被叫号显,传入的显示号码必须是阿里大于“管理中心-号码管理”中申请或购买的号码 @param array $param 文本转语音(TTS)模板变量,传参规则{"key":"value"},key的名字须和TTS模板中的变量名一致 @param string $extend 公共回传参数,在“消息返回”中会透传回该参数 @return mixe...
[ "文本转语音通知" ]
train
https://github.com/chocoboxxf/yii2-alidayu-sdk/blob/47cbc4f5ac1e9378ae4ec4765bdd8802cac9e22f/src/Alidayu.php#L321-L349
chocoboxxf/yii2-alidayu-sdk
src/Alidayu.php
Alidayu.getSignature
public function getSignature($params = [], $method = Alidayu::SIGN_METHOD_HMAC) { $rawQuery = []; ksort($params); foreach ($params as $k => $v) { $rawQuery[] = sprintf('%s%s', $k, $v); } $rawText = implode('', $rawQuery); $signature = ''; if ($meth...
php
public function getSignature($params = [], $method = Alidayu::SIGN_METHOD_HMAC) { $rawQuery = []; ksort($params); foreach ($params as $k => $v) { $rawQuery[] = sprintf('%s%s', $k, $v); } $rawText = implode('', $rawQuery); $signature = ''; if ($meth...
[ "public", "function", "getSignature", "(", "$", "params", "=", "[", "]", ",", "$", "method", "=", "Alidayu", "::", "SIGN_METHOD_HMAC", ")", "{", "$", "rawQuery", "=", "[", "]", ";", "ksort", "(", "$", "params", ")", ";", "foreach", "(", "$", "params"...
生成sign签名 @param array $params 入参 @param string $method 签名方式:md5或hmac-md5 @return string
[ "生成sign签名" ]
train
https://github.com/chocoboxxf/yii2-alidayu-sdk/blob/47cbc4f5ac1e9378ae4ec4765bdd8802cac9e22f/src/Alidayu.php#L357-L372
chocoboxxf/yii2-alidayu-sdk
src/Alidayu.php
Alidayu.post
public function post($url, $data, $headers = []) { $request = new Request('POST', $url, $headers); $response = $this->apiClient->send( $request, [ 'form_params' => $data, ] ); $result = json_decode($response->getBody(), true); ...
php
public function post($url, $data, $headers = []) { $request = new Request('POST', $url, $headers); $response = $this->apiClient->send( $request, [ 'form_params' => $data, ] ); $result = json_decode($response->getBody(), true); ...
[ "public", "function", "post", "(", "$", "url", ",", "$", "data", ",", "$", "headers", "=", "[", "]", ")", "{", "$", "request", "=", "new", "Request", "(", "'POST'", ",", "$", "url", ",", "$", "headers", ")", ";", "$", "response", "=", "$", "thi...
post请求 @param string $url 接口相对路径 @param array $data 接口传参 @param array $headers HTTP Header @return mixed @throws GuzzleException
[ "post请求" ]
train
https://github.com/chocoboxxf/yii2-alidayu-sdk/blob/47cbc4f5ac1e9378ae4ec4765bdd8802cac9e22f/src/Alidayu.php#L391-L402
webforge-labs/psc-cms
lib/PHPWord/PHPWord/Shared/ZipStreamWrapper.php
PHPWord_Shared_ZipStreamWrapper.stream_open
public function stream_open($path, $mode, $options, &$opened_path) { // Check for mode if ($mode{0} != 'r') { throw new Exception('Mode ' . $mode . ' is not supported. Only read mode is supported.'); } // Parse URL $url = @parse_url($path); // Fix URL if (!is_array($url)) { $url['host'] = substr($...
php
public function stream_open($path, $mode, $options, &$opened_path) { // Check for mode if ($mode{0} != 'r') { throw new Exception('Mode ' . $mode . ' is not supported. Only read mode is supported.'); } // Parse URL $url = @parse_url($path); // Fix URL if (!is_array($url)) { $url['host'] = substr($...
[ "public", "function", "stream_open", "(", "$", "path", ",", "$", "mode", ",", "$", "options", ",", "&", "$", "opened_path", ")", "{", "// Check for mode", "if", "(", "$", "mode", "{", "0", "}", "!=", "'r'", ")", "{", "throw", "new", "Exception", "(",...
Open stream
[ "Open", "stream" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Shared/ZipStreamWrapper.php#L73-L107
Chill-project/Main
Controller/PermissionsGroupController.php
PermissionsGroupController.createCreateForm
private function createCreateForm(PermissionsGroup $permissionsGroup) { $form = $this->createForm(new PermissionsGroupType(), $permissionsGroup, array( 'action' => $this->generateUrl('admin_permissionsgroup_create'), 'method' => 'POST', )); $form->add('submit', 'subm...
php
private function createCreateForm(PermissionsGroup $permissionsGroup) { $form = $this->createForm(new PermissionsGroupType(), $permissionsGroup, array( 'action' => $this->generateUrl('admin_permissionsgroup_create'), 'method' => 'POST', )); $form->add('submit', 'subm...
[ "private", "function", "createCreateForm", "(", "PermissionsGroup", "$", "permissionsGroup", ")", "{", "$", "form", "=", "$", "this", "->", "createForm", "(", "new", "PermissionsGroupType", "(", ")", ",", "$", "permissionsGroup", ",", "array", "(", "'action'", ...
Creates a form to create a PermissionsGroup entity. @param PermissionsGroup $permissionsGroup The entity @return \Symfony\Component\Form\Form The form
[ "Creates", "a", "form", "to", "create", "a", "PermissionsGroup", "entity", "." ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/PermissionsGroupController.php#L68-L78
Chill-project/Main
Controller/PermissionsGroupController.php
PermissionsGroupController.newAction
public function newAction() { $permissionsGroup = new PermissionsGroup(); $form = $this->createCreateForm($permissionsGroup); return $this->render('ChillMainBundle:PermissionsGroup:new.html.twig', array( 'entity' => $permissionsGroup, 'form' => $form->createView(...
php
public function newAction() { $permissionsGroup = new PermissionsGroup(); $form = $this->createCreateForm($permissionsGroup); return $this->render('ChillMainBundle:PermissionsGroup:new.html.twig', array( 'entity' => $permissionsGroup, 'form' => $form->createView(...
[ "public", "function", "newAction", "(", ")", "{", "$", "permissionsGroup", "=", "new", "PermissionsGroup", "(", ")", ";", "$", "form", "=", "$", "this", "->", "createCreateForm", "(", "$", "permissionsGroup", ")", ";", "return", "$", "this", "->", "render"...
Displays a form to create a new PermissionsGroup entity.
[ "Displays", "a", "form", "to", "create", "a", "new", "PermissionsGroup", "entity", "." ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/PermissionsGroupController.php#L84-L93
Chill-project/Main
Controller/PermissionsGroupController.php
PermissionsGroupController.showAction
public function showAction($id) { $em = $this->getDoctrine()->getManager(); $permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($id); if (!$permissionsGroup) { throw $this->createNotFoundException('Unable to find PermissionsGroup entity.'); ...
php
public function showAction($id) { $em = $this->getDoctrine()->getManager(); $permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($id); if (!$permissionsGroup) { throw $this->createNotFoundException('Unable to find PermissionsGroup entity.'); ...
[ "public", "function", "showAction", "(", "$", "id", ")", "{", "$", "em", "=", "$", "this", "->", "getDoctrine", "(", ")", "->", "getManager", "(", ")", ";", "$", "permissionsGroup", "=", "$", "em", "->", "getRepository", "(", "'ChillMainBundle:PermissionsG...
Finds and displays a PermissionsGroup entity.
[ "Finds", "and", "displays", "a", "PermissionsGroup", "entity", "." ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/PermissionsGroupController.php#L99-L131
Chill-project/Main
Controller/PermissionsGroupController.php
PermissionsGroupController.getExpandedRoles
private function getExpandedRoles(array $roleScopes) { $expandedRoles = array(); foreach ($roleScopes as $roleScope) { if (!array_key_exists($roleScope->getRole(), $expandedRoles)) { $expandedRoles[$roleScope->getRole()] = array_map( ...
php
private function getExpandedRoles(array $roleScopes) { $expandedRoles = array(); foreach ($roleScopes as $roleScope) { if (!array_key_exists($roleScope->getRole(), $expandedRoles)) { $expandedRoles[$roleScope->getRole()] = array_map( ...
[ "private", "function", "getExpandedRoles", "(", "array", "$", "roleScopes", ")", "{", "$", "expandedRoles", "=", "array", "(", ")", ";", "foreach", "(", "$", "roleScopes", "as", "$", "roleScope", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "r...
expand roleScopes to be easily shown in template @param array $roleScopes @return array
[ "expand", "roleScopes", "to", "be", "easily", "shown", "in", "template" ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/PermissionsGroupController.php#L139-L158
Chill-project/Main
Controller/PermissionsGroupController.php
PermissionsGroupController.editAction
public function editAction($id) { $em = $this->getDoctrine()->getManager(); $permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($id); if (!$permissionsGroup) { throw $this->createNotFoundException('Unable to find PermissionsGroup entity.'); ...
php
public function editAction($id) { $em = $this->getDoctrine()->getManager(); $permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($id); if (!$permissionsGroup) { throw $this->createNotFoundException('Unable to find PermissionsGroup entity.'); ...
[ "public", "function", "editAction", "(", "$", "id", ")", "{", "$", "em", "=", "$", "this", "->", "getDoctrine", "(", ")", "->", "getManager", "(", ")", ";", "$", "permissionsGroup", "=", "$", "em", "->", "getRepository", "(", "'ChillMainBundle:PermissionsG...
Displays a form to edit an existing PermissionsGroup entity.
[ "Displays", "a", "form", "to", "edit", "an", "existing", "PermissionsGroup", "entity", "." ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/PermissionsGroupController.php#L164-L194
Chill-project/Main
Controller/PermissionsGroupController.php
PermissionsGroupController.createEditForm
private function createEditForm(PermissionsGroup $permissionsGroup) { $form = $this->createForm(new PermissionsGroupType(), $permissionsGroup, array( 'action' => $this->generateUrl('admin_permissionsgroup_update', array('id' => $permissionsGroup->getId())), 'method' => 'PUT', ...
php
private function createEditForm(PermissionsGroup $permissionsGroup) { $form = $this->createForm(new PermissionsGroupType(), $permissionsGroup, array( 'action' => $this->generateUrl('admin_permissionsgroup_update', array('id' => $permissionsGroup->getId())), 'method' => 'PUT', ...
[ "private", "function", "createEditForm", "(", "PermissionsGroup", "$", "permissionsGroup", ")", "{", "$", "form", "=", "$", "this", "->", "createForm", "(", "new", "PermissionsGroupType", "(", ")", ",", "$", "permissionsGroup", ",", "array", "(", "'action'", "...
Creates a form to edit a PermissionsGroup entity. @param PermissionsGroup $permissionsGroup The entity @return \Symfony\Component\Form\Form The form
[ "Creates", "a", "form", "to", "edit", "a", "PermissionsGroup", "entity", "." ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/PermissionsGroupController.php#L203-L213
Chill-project/Main
Controller/PermissionsGroupController.php
PermissionsGroupController.updateAction
public function updateAction(Request $request, $id) { $em = $this->getDoctrine()->getManager(); $permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($id); if (!$permissionsGroup) { throw $this->createNotFoundException('Unable to find PermissionsGroup...
php
public function updateAction(Request $request, $id) { $em = $this->getDoctrine()->getManager(); $permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($id); if (!$permissionsGroup) { throw $this->createNotFoundException('Unable to find PermissionsGroup...
[ "public", "function", "updateAction", "(", "Request", "$", "request", ",", "$", "id", ")", "{", "$", "em", "=", "$", "this", "->", "getDoctrine", "(", ")", "->", "getManager", "(", ")", ";", "$", "permissionsGroup", "=", "$", "em", "->", "getRepository...
Edits an existing PermissionsGroup entity.
[ "Edits", "an", "existing", "PermissionsGroup", "entity", "." ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/PermissionsGroupController.php#L219-L257
Chill-project/Main
Controller/PermissionsGroupController.php
PermissionsGroupController.getPersistentRoleScopeBy
protected function getPersistentRoleScopeBy($role, Scope $scope = null) { $em = $this->getDoctrine()->getManager(); $roleScope = $em->getRepository('ChillMainBundle:RoleScope') ->findOneBy(array('role' => $role, 'scope' => $scope)); if ($roleScope === NULL)...
php
protected function getPersistentRoleScopeBy($role, Scope $scope = null) { $em = $this->getDoctrine()->getManager(); $roleScope = $em->getRepository('ChillMainBundle:RoleScope') ->findOneBy(array('role' => $role, 'scope' => $scope)); if ($roleScope === NULL)...
[ "protected", "function", "getPersistentRoleScopeBy", "(", "$", "role", ",", "Scope", "$", "scope", "=", "null", ")", "{", "$", "em", "=", "$", "this", "->", "getDoctrine", "(", ")", "->", "getManager", "(", ")", ";", "$", "roleScope", "=", "$", "em", ...
get a role scope by his parameters. The role scope is persisted if it doesn't exists in database. @param Scope $scope @param string $role @return RoleScope
[ "get", "a", "role", "scope", "by", "his", "parameters", ".", "The", "role", "scope", "is", "persisted", "if", "it", "doesn", "t", "exists", "in", "database", "." ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/PermissionsGroupController.php#L267-L284
Chill-project/Main
Controller/PermissionsGroupController.php
PermissionsGroupController.deleteLinkRoleScopeAction
public function deleteLinkRoleScopeAction($pgid, $rsid) { $em = $this->getDoctrine()->getManager(); $permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($pgid); $roleScope = $em->getRepository('ChillMainBundle:RoleScope')->find($rsid); if (!$per...
php
public function deleteLinkRoleScopeAction($pgid, $rsid) { $em = $this->getDoctrine()->getManager(); $permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($pgid); $roleScope = $em->getRepository('ChillMainBundle:RoleScope')->find($rsid); if (!$per...
[ "public", "function", "deleteLinkRoleScopeAction", "(", "$", "pgid", ",", "$", "rsid", ")", "{", "$", "em", "=", "$", "this", "->", "getDoctrine", "(", ")", "->", "getManager", "(", ")", ";", "$", "permissionsGroup", "=", "$", "em", "->", "getRepository"...
remove an association between permissionsGroup and roleScope @param int $pgid permissionsGroup id @param int $rsid roleScope id @return redirection to edit form
[ "remove", "an", "association", "between", "permissionsGroup", "and", "roleScope" ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/PermissionsGroupController.php#L293-L335
Chill-project/Main
Controller/PermissionsGroupController.php
PermissionsGroupController.createDeleteRoleScopeForm
private function createDeleteRoleScopeForm(PermissionsGroup $permissionsGroup, RoleScope $roleScope) { return $this->createFormBuilder() ->setAction($this->generateUrl('admin_permissionsgroup_delete_role_scope', array('pgid' => $permissionsGroup->getId(), 'rsid' ...
php
private function createDeleteRoleScopeForm(PermissionsGroup $permissionsGroup, RoleScope $roleScope) { return $this->createFormBuilder() ->setAction($this->generateUrl('admin_permissionsgroup_delete_role_scope', array('pgid' => $permissionsGroup->getId(), 'rsid' ...
[ "private", "function", "createDeleteRoleScopeForm", "(", "PermissionsGroup", "$", "permissionsGroup", ",", "RoleScope", "$", "roleScope", ")", "{", "return", "$", "this", "->", "createFormBuilder", "(", ")", "->", "setAction", "(", "$", "this", "->", "generateUrl"...
Creates a form to delete a link to roleScope. @param mixed $permissionsGroup The entity id @return \Symfony\Component\Form\Form The form
[ "Creates", "a", "form", "to", "delete", "a", "link", "to", "roleScope", "." ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/PermissionsGroupController.php#L416-L426
Chill-project/Main
Controller/PermissionsGroupController.php
PermissionsGroupController.createAddRoleScopeForm
private function createAddRoleScopeForm(PermissionsGroup $permissionsGroup) { return $this->createFormBuilder() ->setAction($this->generateUrl('admin_permissionsgroup_add_role_scope', array('id' => $permissionsGroup->getId()))) ->setMethod('PUT') ...
php
private function createAddRoleScopeForm(PermissionsGroup $permissionsGroup) { return $this->createFormBuilder() ->setAction($this->generateUrl('admin_permissionsgroup_add_role_scope', array('id' => $permissionsGroup->getId()))) ->setMethod('PUT') ...
[ "private", "function", "createAddRoleScopeForm", "(", "PermissionsGroup", "$", "permissionsGroup", ")", "{", "return", "$", "this", "->", "createFormBuilder", "(", ")", "->", "setAction", "(", "$", "this", "->", "generateUrl", "(", "'admin_permissionsgroup_add_role_sc...
creates a form to add a role scope to permissionsgroup @param PermissionsGroup $permissionsGroup @return \Symfony\Component\Form\Form The form
[ "creates", "a", "form", "to", "add", "a", "role", "scope", "to", "permissionsgroup" ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Controller/PermissionsGroupController.php#L434-L444
qcubed/orm
src/Query/Clause/GroupBy.php
GroupBy.collapseNodes
protected function collapseNodes($mixParameterArray) { $objNodeArray = array(); foreach ($mixParameterArray as $mixParameter) { if (is_array($mixParameter)) { $objNodeArray = array_merge($objNodeArray, $mixParameter); } else { array_push($objNo...
php
protected function collapseNodes($mixParameterArray) { $objNodeArray = array(); foreach ($mixParameterArray as $mixParameter) { if (is_array($mixParameter)) { $objNodeArray = array_merge($objNodeArray, $mixParameter); } else { array_push($objNo...
[ "protected", "function", "collapseNodes", "(", "$", "mixParameterArray", ")", "{", "$", "objNodeArray", "=", "array", "(", ")", ";", "foreach", "(", "$", "mixParameterArray", "as", "$", "mixParameter", ")", "{", "if", "(", "is_array", "(", "$", "mixParameter...
CollapseNodes makes sure a node list is vetted, and turned into a node list. This also allows table nodes to be used in certain column node contexts, in which it will substitute the primary key node in this situation. @param $mixParameterArray @return Node\Column[] @throws Caller @throws InvalidCast
[ "CollapseNodes", "makes", "sure", "a", "node", "list", "is", "vetted", "and", "turned", "into", "a", "node", "list", ".", "This", "also", "allows", "table", "nodes", "to", "be", "used", "in", "certain", "column", "node", "contexts", "in", "which", "it", ...
train
https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Query/Clause/GroupBy.php#L38-L77
aedart/laravel-helpers
src/Traits/Queue/QueueTrait.php
QueueTrait.getQueue
public function getQueue(): ?Queue { if (!$this->hasQueue()) { $this->setQueue($this->getDefaultQueue()); } return $this->queue; }
php
public function getQueue(): ?Queue { if (!$this->hasQueue()) { $this->setQueue($this->getDefaultQueue()); } return $this->queue; }
[ "public", "function", "getQueue", "(", ")", ":", "?", "Queue", "{", "if", "(", "!", "$", "this", "->", "hasQueue", "(", ")", ")", "{", "$", "this", "->", "setQueue", "(", "$", "this", "->", "getDefaultQueue", "(", ")", ")", ";", "}", "return", "$...
Get queue If no queue has been set, this method will set and return a default queue, if any such value is available @see getDefaultQueue() @return Queue|null queue or null if none queue has been set
[ "Get", "queue" ]
train
https://github.com/aedart/laravel-helpers/blob/8b81a2d6658f3f8cb62b6be2c34773aaa2df219a/src/Traits/Queue/QueueTrait.php#L53-L59
aedart/laravel-helpers
src/Traits/Queue/QueueTrait.php
QueueTrait.getDefaultQueue
public function getDefaultQueue(): ?Queue { // By default, the Queue Facade does not return the // any actual database connection, but rather an // instance of \Illuminate\Queue\QueueManager. // Therefore, we make sure only to obtain its // "connection", to make sure that its...
php
public function getDefaultQueue(): ?Queue { // By default, the Queue Facade does not return the // any actual database connection, but rather an // instance of \Illuminate\Queue\QueueManager. // Therefore, we make sure only to obtain its // "connection", to make sure that its...
[ "public", "function", "getDefaultQueue", "(", ")", ":", "?", "Queue", "{", "// By default, the Queue Facade does not return the", "// any actual database connection, but rather an", "// instance of \\Illuminate\\Queue\\QueueManager.", "// Therefore, we make sure only to obtain its", "// \"...
Get a default queue value, if any is available @return Queue|null A default queue value or Null if no default value is available
[ "Get", "a", "default", "queue", "value", "if", "any", "is", "available" ]
train
https://github.com/aedart/laravel-helpers/blob/8b81a2d6658f3f8cb62b6be2c34773aaa2df219a/src/Traits/Queue/QueueTrait.php#L76-L89
SAREhub/PHP_Commons
src/SAREhub/Commons/Misc/SqliteHashStorage.php
SqliteHashStorage.insertMulti
public function insertMulti(array $hashes) { $valuesString = ''; foreach ($hashes as $id => $hash) { $valuesString .= "('$id','$hash'),"; } $this->storage->exec("INSERT INTO " . $this->tableName . "(id, hash) VALUES " . rtrim($valuesString, ',')); }
php
public function insertMulti(array $hashes) { $valuesString = ''; foreach ($hashes as $id => $hash) { $valuesString .= "('$id','$hash'),"; } $this->storage->exec("INSERT INTO " . $this->tableName . "(id, hash) VALUES " . rtrim($valuesString, ',')); }
[ "public", "function", "insertMulti", "(", "array", "$", "hashes", ")", "{", "$", "valuesString", "=", "''", ";", "foreach", "(", "$", "hashes", "as", "$", "id", "=>", "$", "hash", ")", "{", "$", "valuesString", ".=", "\"('$id','$hash'),\"", ";", "}", "...
Inserts hashes in batch for better performance @param array $hashes 'id' => 'hash'
[ "Inserts", "hashes", "in", "batch", "for", "better", "performance" ]
train
https://github.com/SAREhub/PHP_Commons/blob/4e1769ab6411a584112df1151dcc90e6b82fe2bb/src/SAREhub/Commons/Misc/SqliteHashStorage.php#L83-L91
SAREhub/PHP_Commons
src/SAREhub/Commons/Misc/SqliteHashStorage.php
SqliteHashStorage.updateMulti
public function updateMulti(array $hashes) { $startSql = "UPDATE " . $this->tableName; $this->storage->exec('BEGIN TRANSACTION'); foreach ($hashes as $id => $hash) { $this->storage->exec($startSql . " SET hash='$hash' WHERE id='$id'"); } $this->storage->exec('END ...
php
public function updateMulti(array $hashes) { $startSql = "UPDATE " . $this->tableName; $this->storage->exec('BEGIN TRANSACTION'); foreach ($hashes as $id => $hash) { $this->storage->exec($startSql . " SET hash='$hash' WHERE id='$id'"); } $this->storage->exec('END ...
[ "public", "function", "updateMulti", "(", "array", "$", "hashes", ")", "{", "$", "startSql", "=", "\"UPDATE \"", ".", "$", "this", "->", "tableName", ";", "$", "this", "->", "storage", "->", "exec", "(", "'BEGIN TRANSACTION'", ")", ";", "foreach", "(", "...
Updating hashes in batch for better performance @param array $hashes 'id' => 'hash'
[ "Updating", "hashes", "in", "batch", "for", "better", "performance" ]
train
https://github.com/SAREhub/PHP_Commons/blob/4e1769ab6411a584112df1151dcc90e6b82fe2bb/src/SAREhub/Commons/Misc/SqliteHashStorage.php#L97-L105
webforge-labs/psc-cms
lib/PHPWord/PHPWord/Style.php
PHPWord_Style.addParagraphStyle
public static function addParagraphStyle($styleName, $styles) { if(!array_key_exists($styleName, self::$_styleElements)) { $style = new PHPWord_Style_Paragraph(); foreach($styles as $key => $value) { if(substr($key, 0, 1) != '_') { $key = '_'.$key; } $style->setStyleValue($key, $value); ...
php
public static function addParagraphStyle($styleName, $styles) { if(!array_key_exists($styleName, self::$_styleElements)) { $style = new PHPWord_Style_Paragraph(); foreach($styles as $key => $value) { if(substr($key, 0, 1) != '_') { $key = '_'.$key; } $style->setStyleValue($key, $value); ...
[ "public", "static", "function", "addParagraphStyle", "(", "$", "styleName", ",", "$", "styles", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "styleName", ",", "self", "::", "$", "_styleElements", ")", ")", "{", "$", "style", "=", "new", "PHPWo...
Add a paragraph style @param string $styleName @param array $styles
[ "Add", "a", "paragraph", "style" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Style.php#L52-L64
webforge-labs/psc-cms
lib/PHPWord/PHPWord/Style.php
PHPWord_Style.addFontStyle
public static function addFontStyle($styleName, $styleFont, $styleParagraph = null) { if(!array_key_exists($styleName, self::$_styleElements)) { $font = new PHPWord_Style_Font('text', $styleParagraph); foreach($styleFont as $key => $value) { if(substr($key, 0, 1) != '_') { $key = '_'.$key; } ...
php
public static function addFontStyle($styleName, $styleFont, $styleParagraph = null) { if(!array_key_exists($styleName, self::$_styleElements)) { $font = new PHPWord_Style_Font('text', $styleParagraph); foreach($styleFont as $key => $value) { if(substr($key, 0, 1) != '_') { $key = '_'.$key; } ...
[ "public", "static", "function", "addFontStyle", "(", "$", "styleName", ",", "$", "styleFont", ",", "$", "styleParagraph", "=", "null", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "styleName", ",", "self", "::", "$", "_styleElements", ")", ")", ...
Add a font style @param string $styleName @param array $styleFont @param array $styleParagraph
[ "Add", "a", "font", "style" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Style.php#L73-L84
webforge-labs/psc-cms
lib/PHPWord/PHPWord/Style.php
PHPWord_Style.addLinkStyle
public static function addLinkStyle($styleName, $styles) { if(!array_key_exists($styleName, self::$_styleElements)) { $style = new PHPWord_Style_Font('link'); foreach($styles as $key => $value) { if(substr($key, 0, 1) != '_') { $key = '_'.$key; } $style->setStyleValue($key, $value); ...
php
public static function addLinkStyle($styleName, $styles) { if(!array_key_exists($styleName, self::$_styleElements)) { $style = new PHPWord_Style_Font('link'); foreach($styles as $key => $value) { if(substr($key, 0, 1) != '_') { $key = '_'.$key; } $style->setStyleValue($key, $value); ...
[ "public", "static", "function", "addLinkStyle", "(", "$", "styleName", ",", "$", "styles", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "styleName", ",", "self", "::", "$", "_styleElements", ")", ")", "{", "$", "style", "=", "new", "PHPWord_St...
Add a link style @param string $styleName @param array $styles
[ "Add", "a", "link", "style" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Style.php#L92-L104
webforge-labs/psc-cms
lib/PHPWord/PHPWord/Style.php
PHPWord_Style.addTableStyle
public static function addTableStyle($styleName, $styleTable, $styleFirstRow = null, $styleLastRow = null) { if(!array_key_exists($styleName, self::$_styleElements)) { $style = new PHPWord_Style_TableFull($styleTable, $styleFirstRow, $styleLastRow); self::$_styleElements[$styleName] = $style; } }
php
public static function addTableStyle($styleName, $styleTable, $styleFirstRow = null, $styleLastRow = null) { if(!array_key_exists($styleName, self::$_styleElements)) { $style = new PHPWord_Style_TableFull($styleTable, $styleFirstRow, $styleLastRow); self::$_styleElements[$styleName] = $style; } }
[ "public", "static", "function", "addTableStyle", "(", "$", "styleName", ",", "$", "styleTable", ",", "$", "styleFirstRow", "=", "null", ",", "$", "styleLastRow", "=", "null", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "styleName", ",", "self",...
Add a table style @param string $styleName @param array $styles
[ "Add", "a", "table", "style" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Style.php#L112-L118
struzik-vladislav/php-error-handler
src/ErrorHandler.php
ErrorHandler.handle
public function handle($errno, $errstr, $errfile, $errline) { if (!$this->processorsStack) { return null; } foreach ($this->processorsStack as $processor) { if (!($processor->getErrorTypes() & $errno)) { continue; } $lastResul...
php
public function handle($errno, $errstr, $errfile, $errline) { if (!$this->processorsStack) { return null; } foreach ($this->processorsStack as $processor) { if (!($processor->getErrorTypes() & $errno)) { continue; } $lastResul...
[ "public", "function", "handle", "(", "$", "errno", ",", "$", "errstr", ",", "$", "errfile", ",", "$", "errline", ")", "{", "if", "(", "!", "$", "this", "->", "processorsStack", ")", "{", "return", "null", ";", "}", "foreach", "(", "$", "this", "->"...
Error handler. @param int $errno level of the error raised @param string $errstr error message @param string $errfile filename that the error was raised @param int $errline line number the error was raised @return mixed
[ "Error", "handler", "." ]
train
https://github.com/struzik-vladislav/php-error-handler/blob/87fa9f56edca7011f78e00659bb094b4fe713ebe/src/ErrorHandler.php#L28-L43
struzik-vladislav/php-error-handler
src/ErrorHandler.php
ErrorHandler.setProcessorsStack
public function setProcessorsStack(array $stack) { $this->processorsStack = []; foreach (array_reverse($stack) as $processor) { $this->pushProcessor($processor); } return $this; }
php
public function setProcessorsStack(array $stack) { $this->processorsStack = []; foreach (array_reverse($stack) as $processor) { $this->pushProcessor($processor); } return $this; }
[ "public", "function", "setProcessorsStack", "(", "array", "$", "stack", ")", "{", "$", "this", "->", "processorsStack", "=", "[", "]", ";", "foreach", "(", "array_reverse", "(", "$", "stack", ")", "as", "$", "processor", ")", "{", "$", "this", "->", "p...
Setting the processors stack as array. @param ProcessorInterface[] $stack processors stack @return ErrorHandler
[ "Setting", "the", "processors", "stack", "as", "array", "." ]
train
https://github.com/struzik-vladislav/php-error-handler/blob/87fa9f56edca7011f78e00659bb094b4fe713ebe/src/ErrorHandler.php#L102-L110
webforge-labs/psc-cms
lib/Psc/CMS/Action.php
Action.getEntityMeta
public function getEntityMeta(EntityMetaProvider $entityMetaProvider = NULL) { if (!isset($this->entityMeta) && $this->type === self::SPECIFIC) { if (!isset($entityMetaProvider)) throw new \LogicException('Missing Parameter 1 (EntityMetaProvider) for '.__FUNCTION__); $this->entityMeta = $entityMe...
php
public function getEntityMeta(EntityMetaProvider $entityMetaProvider = NULL) { if (!isset($this->entityMeta) && $this->type === self::SPECIFIC) { if (!isset($entityMetaProvider)) throw new \LogicException('Missing Parameter 1 (EntityMetaProvider) for '.__FUNCTION__); $this->entityMeta = $entityMe...
[ "public", "function", "getEntityMeta", "(", "EntityMetaProvider", "$", "entityMetaProvider", "=", "NULL", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "entityMeta", ")", "&&", "$", "this", "->", "type", "===", "self", "::", "SPECIFIC", ")", ...
Returns the EntityMeta for specific or general type Attention: When type is specific $dc is not optional! @return Psc\CMS\EntityMeta
[ "Returns", "the", "EntityMeta", "for", "specific", "or", "general", "type" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/CMS/Action.php#L48-L56
joomlatools/joomlatools-platform-legacy
code/exception/exception.php
JException.get
public function get($property, $default = null) { JLog::add('JException::get is deprecated.', JLog::WARNING, 'deprecated'); if (isset($this->$property)) { return $this->$property; } return $default; }
php
public function get($property, $default = null) { JLog::add('JException::get is deprecated.', JLog::WARNING, 'deprecated'); if (isset($this->$property)) { return $this->$property; } return $default; }
[ "public", "function", "get", "(", "$", "property", ",", "$", "default", "=", "null", ")", "{", "JLog", "::", "add", "(", "'JException::get is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "if", "(", "isset", "(", "$", "this"...
Returns a property of the object or the default value if the property is not set. @param string $property The name of the property @param mixed $default The default value @return mixed The value of the property or null @deprecated 12.1 @see JException::getProperties() @since 11.1
[ "Returns", "a", "property", "of", "the", "object", "or", "the", "default", "value", "if", "the", "property", "is", "not", "set", "." ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/exception/exception.php#L219-L229
joomlatools/joomlatools-platform-legacy
code/exception/exception.php
JException.getProperties
public function getProperties($public = true) { JLog::add('JException::getProperties is deprecated.', JLog::WARNING, 'deprecated'); $vars = get_object_vars($this); if ($public) { foreach ($vars as $key => $value) { if ('_' == substr($key, 0, 1)) { unset($vars[$key]); } } } retu...
php
public function getProperties($public = true) { JLog::add('JException::getProperties is deprecated.', JLog::WARNING, 'deprecated'); $vars = get_object_vars($this); if ($public) { foreach ($vars as $key => $value) { if ('_' == substr($key, 0, 1)) { unset($vars[$key]); } } } retu...
[ "public", "function", "getProperties", "(", "$", "public", "=", "true", ")", "{", "JLog", "::", "add", "(", "'JException::getProperties is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "$", "vars", "=", "get_object_vars", "(", "$"...
Returns an associative array of object properties @param boolean $public If true, returns only the public properties @return array Object properties @deprecated 12.1 @see JException::get() @since 11.1
[ "Returns", "an", "associative", "array", "of", "object", "properties" ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/exception/exception.php#L242-L260
joomlatools/joomlatools-platform-legacy
code/exception/exception.php
JException.set
public function set($property, $value = null) { JLog::add('JException::set is deprecated.', JLog::WARNING, 'deprecated'); $previous = isset($this->$property) ? $this->$property : null; $this->$property = $value; return $previous; }
php
public function set($property, $value = null) { JLog::add('JException::set is deprecated.', JLog::WARNING, 'deprecated'); $previous = isset($this->$property) ? $this->$property : null; $this->$property = $value; return $previous; }
[ "public", "function", "set", "(", "$", "property", ",", "$", "value", "=", "null", ")", "{", "JLog", "::", "add", "(", "'JException::set is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "$", "previous", "=", "isset", "(", "$...
Modifies a property of the object, creating it if it does not already exist. @param string $property The name of the property @param mixed $value The value of the property to set @return mixed Previous value of the property @deprecated 12.1 @see JException::setProperties() @since 11.1
[ "Modifies", "a", "property", "of", "the", "object", "creating", "it", "if", "it", "does", "not", "already", "exist", "." ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/exception/exception.php#L331-L339
joomlatools/joomlatools-platform-legacy
code/exception/exception.php
JException.setProperties
public function setProperties($properties) { JLog::add('JException::setProperties is deprecated.', JLog::WARNING, 'deprecated'); // Cast to an array $properties = (array) $properties; if (is_array($properties)) { foreach ($properties as $k => $v) { $this->$k = $v; } return true; } ret...
php
public function setProperties($properties) { JLog::add('JException::setProperties is deprecated.', JLog::WARNING, 'deprecated'); // Cast to an array $properties = (array) $properties; if (is_array($properties)) { foreach ($properties as $k => $v) { $this->$k = $v; } return true; } ret...
[ "public", "function", "setProperties", "(", "$", "properties", ")", "{", "JLog", "::", "add", "(", "'JException::setProperties is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "// Cast to an array", "$", "properties", "=", "(", "array...
Set the object properties based on a named array/hash @param mixed $properties Either and associative array or another object @return boolean @deprecated 12.1 @see JException::set() @since 11.1
[ "Set", "the", "object", "properties", "based", "on", "a", "named", "array", "/", "hash" ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/exception/exception.php#L352-L370
joomlatools/joomlatools-platform-legacy
code/exception/exception.php
JException.setError
public function setError($error) { JLog::add('JException::setErrors is deprecated.', JLog::WARNING, 'deprecated'); array_push($this->_errors, $error); }
php
public function setError($error) { JLog::add('JException::setErrors is deprecated.', JLog::WARNING, 'deprecated'); array_push($this->_errors, $error); }
[ "public", "function", "setError", "(", "$", "error", ")", "{", "JLog", "::", "add", "(", "'JException::setErrors is deprecated.'", ",", "JLog", "::", "WARNING", ",", "'deprecated'", ")", ";", "array_push", "(", "$", "this", "->", "_errors", ",", "$", "error"...
Add an error message @param string $error Error message @return void @since 11.1 @deprecated 12.1
[ "Add", "an", "error", "message" ]
train
https://github.com/joomlatools/joomlatools-platform-legacy/blob/3a76944e2f2c415faa6504754c75321a3b478c06/code/exception/exception.php#L383-L388
ChadSikorra/php-simple-enum
src/Enums/EnumTrait.php
EnumTrait.isValidValue
public static function isValidValue($value, $strict = false) { static::initialize(); return (array_search($value, static::$constants, $strict) !== false); }
php
public static function isValidValue($value, $strict = false) { static::initialize(); return (array_search($value, static::$constants, $strict) !== false); }
[ "public", "static", "function", "isValidValue", "(", "$", "value", ",", "$", "strict", "=", "false", ")", "{", "static", "::", "initialize", "(", ")", ";", "return", "(", "array_search", "(", "$", "value", ",", "static", "::", "$", "constants", ",", "$...
Check if a specific enum exists by value. @param $value @param bool $strict @return bool
[ "Check", "if", "a", "specific", "enum", "exists", "by", "value", "." ]
train
https://github.com/ChadSikorra/php-simple-enum/blob/781f87ae9f4cc75fb2edab6517c6471c0181e93b/src/Enums/EnumTrait.php#L101-L106
ChadSikorra/php-simple-enum
src/Enums/EnumTrait.php
EnumTrait.getValueName
public static function getValueName($value, $strict = false) { if (!static::isValidValue($value)) { throw new \InvalidArgumentException('No enum name was found for the value supplied.'); } return array_search($value, static::$constants, $strict); }
php
public static function getValueName($value, $strict = false) { if (!static::isValidValue($value)) { throw new \InvalidArgumentException('No enum name was found for the value supplied.'); } return array_search($value, static::$constants, $strict); }
[ "public", "static", "function", "getValueName", "(", "$", "value", ",", "$", "strict", "=", "false", ")", "{", "if", "(", "!", "static", "::", "isValidValue", "(", "$", "value", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'No e...
Get the enum name from its value. @param mixed $value @param bool $strict @return string
[ "Get", "the", "enum", "name", "from", "its", "value", "." ]
train
https://github.com/ChadSikorra/php-simple-enum/blob/781f87ae9f4cc75fb2edab6517c6471c0181e93b/src/Enums/EnumTrait.php#L115-L122
ChadSikorra/php-simple-enum
src/Enums/EnumTrait.php
EnumTrait.getNameValue
public static function getNameValue($name) { static::initialize(); if (!static::isValidName($name)) { throw new \InvalidArgumentException(sprintf( 'The enum name "%s" is not valid. Expected one of: %s', $name, implode(', ', static::names()...
php
public static function getNameValue($name) { static::initialize(); if (!static::isValidName($name)) { throw new \InvalidArgumentException(sprintf( 'The enum name "%s" is not valid. Expected one of: %s', $name, implode(', ', static::names()...
[ "public", "static", "function", "getNameValue", "(", "$", "name", ")", "{", "static", "::", "initialize", "(", ")", ";", "if", "(", "!", "static", "::", "isValidName", "(", "$", "name", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "("...
Get the enum value from its name. @param string $name @return mixed
[ "Get", "the", "enum", "value", "from", "its", "name", "." ]
train
https://github.com/ChadSikorra/php-simple-enum/blob/781f87ae9f4cc75fb2edab6517c6471c0181e93b/src/Enums/EnumTrait.php#L130-L143
ChadSikorra/php-simple-enum
src/Enums/EnumTrait.php
EnumTrait.initialize
protected static function initialize() { $class = static::class; if (static::$constants === null) { static::$constants = (new \ReflectionClass($class))->getConstants(); foreach (static::names() as $name) { static::$lcKeyMap[strtolower($name)] = $name; ...
php
protected static function initialize() { $class = static::class; if (static::$constants === null) { static::$constants = (new \ReflectionClass($class))->getConstants(); foreach (static::names() as $name) { static::$lcKeyMap[strtolower($name)] = $name; ...
[ "protected", "static", "function", "initialize", "(", ")", "{", "$", "class", "=", "static", "::", "class", ";", "if", "(", "static", "::", "$", "constants", "===", "null", ")", "{", "static", "::", "$", "constants", "=", "(", "new", "\\", "ReflectionC...
Cache the enum array statically so we only have to do reflection a single time.
[ "Cache", "the", "enum", "array", "statically", "so", "we", "only", "have", "to", "do", "reflection", "a", "single", "time", "." ]
train
https://github.com/ChadSikorra/php-simple-enum/blob/781f87ae9f4cc75fb2edab6517c6471c0181e93b/src/Enums/EnumTrait.php#L148-L159
barebone-php/barebone-core
lib/View.php
View.instance
public static function instance() { if (null === self::$_instance) { self::$_instance = new Blade( APP_ROOT . 'views', PROJECT_ROOT . 'tmp' . DS . 'cache' ); } return self::$_instance; }
php
public static function instance() { if (null === self::$_instance) { self::$_instance = new Blade( APP_ROOT . 'views', PROJECT_ROOT . 'tmp' . DS . 'cache' ); } return self::$_instance; }
[ "public", "static", "function", "instance", "(", ")", "{", "if", "(", "null", "===", "self", "::", "$", "_instance", ")", "{", "self", "::", "$", "_instance", "=", "new", "Blade", "(", "APP_ROOT", ".", "'views'", ",", "PROJECT_ROOT", ".", "'tmp'", ".",...
Instantiate Blade Renderer @return Blade
[ "Instantiate", "Blade", "Renderer" ]
train
https://github.com/barebone-php/barebone-core/blob/7fda3a62d5fa103cdc4d2d34e1adf8f3ccbfe2bc/lib/View.php#L46-L55
barebone-php/barebone-core
lib/View.php
View.render
public static function render($template, $data = []) { // @var \Illuminate\View\Factory $factory $factory = self::instance()->view(); // @var \Illuminate\Contracts\View\View $view $view = $factory->make($template, $data); return $view->render(); }
php
public static function render($template, $data = []) { // @var \Illuminate\View\Factory $factory $factory = self::instance()->view(); // @var \Illuminate\Contracts\View\View $view $view = $factory->make($template, $data); return $view->render(); }
[ "public", "static", "function", "render", "(", "$", "template", ",", "$", "data", "=", "[", "]", ")", "{", "// @var \\Illuminate\\View\\Factory $factory", "$", "factory", "=", "self", "::", "instance", "(", ")", "->", "view", "(", ")", ";", "// @var \\Illumi...
Render Blade template file with Data @param string $template Relative path to a ".blade.php" file @param array $data Associative array of variables names and values. @return string HTML string
[ "Render", "Blade", "template", "file", "with", "Data" ]
train
https://github.com/barebone-php/barebone-core/blob/7fda3a62d5fa103cdc4d2d34e1adf8f3ccbfe2bc/lib/View.php#L65-L74
barebone-php/barebone-core
lib/View.php
View.renderJSON
public static function renderJSON($data = [], $flags = null) { if (is_null($flags)) { $flags = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_SLASHES; } json_encode(null); // clear json_last_error() $result = ...
php
public static function renderJSON($data = [], $flags = null) { if (is_null($flags)) { $flags = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_SLASHES; } json_encode(null); // clear json_last_error() $result = ...
[ "public", "static", "function", "renderJSON", "(", "$", "data", "=", "[", "]", ",", "$", "flags", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "flags", ")", ")", "{", "$", "flags", "=", "JSON_HEX_TAG", "|", "JSON_HEX_APOS", "|", "JSON_HEX_A...
Json Encode String with given flags @param array $data Associative array of variables names and values. @param integer $flags json_encode options @throws InvalidArgumentException @return string JSON string
[ "Json", "Encode", "String", "with", "given", "flags" ]
train
https://github.com/barebone-php/barebone-core/blob/7fda3a62d5fa103cdc4d2d34e1adf8f3ccbfe2bc/lib/View.php#L85-L106
inc2734/wp-share-buttons
src/App/Shortcode/Pinterest.php
Pinterest._shortcode
public function _shortcode( $attributes ) { if ( ! isset( $attributes['post_id'] ) ) { return; } $attributes = shortcode_atts( [ 'type' => 'balloon', 'post_id' => '', ], $attributes ); if ( 'official' === $attributes['type'] ) { $file = 'official'; } else { $file = 'pinterest'...
php
public function _shortcode( $attributes ) { if ( ! isset( $attributes['post_id'] ) ) { return; } $attributes = shortcode_atts( [ 'type' => 'balloon', 'post_id' => '', ], $attributes ); if ( 'official' === $attributes['type'] ) { $file = 'official'; } else { $file = 'pinterest'...
[ "public", "function", "_shortcode", "(", "$", "attributes", ")", "{", "if", "(", "!", "isset", "(", "$", "attributes", "[", "'post_id'", "]", ")", ")", "{", "return", ";", "}", "$", "attributes", "=", "shortcode_atts", "(", "[", "'type'", "=>", "'ballo...
Register shortcode @param array $attributes @return void
[ "Register", "shortcode" ]
train
https://github.com/inc2734/wp-share-buttons/blob/cd032893ca083a343f5871e855cce68f4ede3a17/src/App/Shortcode/Pinterest.php#L23-L49
rayrutjes/domain-foundation
src/Persistence/Pdo/EventStore/PdoEventStore.php
PdoEventStore.append
public function append(Contract $aggregateRootType, EventStream $eventStream) { $statement = $this->insertQuery->prepare(); try { while ($eventStream->hasNext()) { $event = $eventStream->next(); $statement->bindValue(':aggregate_id', $event->aggregateRoo...
php
public function append(Contract $aggregateRootType, EventStream $eventStream) { $statement = $this->insertQuery->prepare(); try { while ($eventStream->hasNext()) { $event = $eventStream->next(); $statement->bindValue(':aggregate_id', $event->aggregateRoo...
[ "public", "function", "append", "(", "Contract", "$", "aggregateRootType", ",", "EventStream", "$", "eventStream", ")", "{", "$", "statement", "=", "$", "this", "->", "insertQuery", "->", "prepare", "(", ")", ";", "try", "{", "while", "(", "$", "eventStrea...
@param Contract $aggregateRootType @param EventStream $eventStream @throws \Exception
[ "@param", "Contract", "$aggregateRootType", "@param", "EventStream", "$eventStream" ]
train
https://github.com/rayrutjes/domain-foundation/blob/2bce7cd6a6612f718e70e3176589c1abf39d1a3e/src/Persistence/Pdo/EventStore/PdoEventStore.php#L72-L100
rayrutjes/domain-foundation
src/Persistence/Pdo/EventStore/PdoEventStore.php
PdoEventStore.read
public function read(Contract $aggregateRootType, AggregateRootIdentifier $aggregateRootIdentifier) { $statement = $this->selectQuery->prepare(); $statement->bindValue(':aggregate_id', $aggregateRootIdentifier->toString()); $statement->bindValue(':aggregate_type', $aggregateRootType->toStri...
php
public function read(Contract $aggregateRootType, AggregateRootIdentifier $aggregateRootIdentifier) { $statement = $this->selectQuery->prepare(); $statement->bindValue(':aggregate_id', $aggregateRootIdentifier->toString()); $statement->bindValue(':aggregate_type', $aggregateRootType->toStri...
[ "public", "function", "read", "(", "Contract", "$", "aggregateRootType", ",", "AggregateRootIdentifier", "$", "aggregateRootIdentifier", ")", "{", "$", "statement", "=", "$", "this", "->", "selectQuery", "->", "prepare", "(", ")", ";", "$", "statement", "->", ...
@param Contract $aggregateRootType @param AggregateRootIdentifier $aggregateRootIdentifier @return EventStream
[ "@param", "Contract", "$aggregateRootType", "@param", "AggregateRootIdentifier", "$aggregateRootIdentifier" ]
train
https://github.com/rayrutjes/domain-foundation/blob/2bce7cd6a6612f718e70e3176589c1abf39d1a3e/src/Persistence/Pdo/EventStore/PdoEventStore.php#L108-L125
boekkooi/tactician-amqp
src/Middleware/Transaction/InMemoryMiddleware.php
InMemoryMiddleware.execute
public function execute($command, callable $next) { if ($this->transactionLevel > 0) { $this->storeMessages(); } ++$this->transactionLevel; end($this->transactionMessages); $savepoint = key($this->transactionMessages); $savepoint = $savepoint === null ? ...
php
public function execute($command, callable $next) { if ($this->transactionLevel > 0) { $this->storeMessages(); } ++$this->transactionLevel; end($this->transactionMessages); $savepoint = key($this->transactionMessages); $savepoint = $savepoint === null ? ...
[ "public", "function", "execute", "(", "$", "command", ",", "callable", "$", "next", ")", "{", "if", "(", "$", "this", "->", "transactionLevel", ">", "0", ")", "{", "$", "this", "->", "storeMessages", "(", ")", ";", "}", "++", "$", "this", "->", "tr...
Executes the given command and optionally returns a value @param object $command @param callable $next @return mixed @throws \Error @throws \Exception
[ "Executes", "the", "given", "command", "and", "optionally", "returns", "a", "value" ]
train
https://github.com/boekkooi/tactician-amqp/blob/55cbb8b9e20aab7891e6a6090b248377c599360e/src/Middleware/Transaction/InMemoryMiddleware.php#L51-L88
webforge-labs/psc-cms
lib/Psc/CMS/Controller/BaseController.php
BaseController.getTodo
public function getTodo($todoAlias = NULL) { if ($todoAlias === NULL) return $this->todo; if (array_key_exists($todoAlias,$this->todoMap)) { return $this->todoMap[$todoAlias]; } else { throw new InvalidTodoException('Kein Alias für '.Code::varInfo($todoAlias).' gefunden. Ist dieser String e...
php
public function getTodo($todoAlias = NULL) { if ($todoAlias === NULL) return $this->todo; if (array_key_exists($todoAlias,$this->todoMap)) { return $this->todoMap[$todoAlias]; } else { throw new InvalidTodoException('Kein Alias für '.Code::varInfo($todoAlias).' gefunden. Ist dieser String e...
[ "public", "function", "getTodo", "(", "$", "todoAlias", "=", "NULL", ")", "{", "if", "(", "$", "todoAlias", "===", "NULL", ")", "return", "$", "this", "->", "todo", ";", "if", "(", "array_key_exists", "(", "$", "todoAlias", ",", "$", "this", "->", "t...
Wenn kein Parameter übergeben wird gibt es den aktuellen TODO zurück wenn gesetzt wird die Konstante für den todoString zurückgegeben @param string $todoString @return const
[ "Wenn", "kein", "Parameter", "übergeben", "wird", "gibt", "es", "den", "aktuellen", "TODO", "zurück", "wenn", "gesetzt", "wird", "die", "Konstante", "für", "den", "todoString", "zurückgegeben" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/CMS/Controller/BaseController.php#L72-L80
webforge-labs/psc-cms
lib/Psc/CMS/Controller/BaseController.php
BaseController.getTodoURL
public function getTodoURL($todo=NULL, $flags = 0x000000) { return $this->getURL($this->getTodoQueryVars($todo),$flags); }
php
public function getTodoURL($todo=NULL, $flags = 0x000000) { return $this->getURL($this->getTodoQueryVars($todo),$flags); }
[ "public", "function", "getTodoURL", "(", "$", "todo", "=", "NULL", ",", "$", "flags", "=", "0x000000", ")", "{", "return", "$", "this", "->", "getURL", "(", "$", "this", "->", "getTodoQueryVars", "(", "$", "todo", ")", ",", "$", "flags", ")", ";", ...
Gibt die URL für eine Action des Controllers zurück dies kann z.b. für form action="" benutzt werden @param const $todo wenn NULL wird dies die aktuelle Action/ Default Action
[ "Gibt", "die", "URL", "für", "eine", "Action", "des", "Controllers", "zurück" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/CMS/Controller/BaseController.php#L171-L173
webforge-labs/psc-cms
lib/Psc/CMS/Controller/BaseController.php
BaseController.assertTodo
protected function assertTodo($todo = NULL) { if (func_num_args() == 0) { $todo = $this->todo; } if ($todo != NULL && !$this->validateTodo($todo)) { throw new InvalidTodoException('Todo: '.Code::varInfo($todo).' ist nicht in der todoMap'); } }
php
protected function assertTodo($todo = NULL) { if (func_num_args() == 0) { $todo = $this->todo; } if ($todo != NULL && !$this->validateTodo($todo)) { throw new InvalidTodoException('Todo: '.Code::varInfo($todo).' ist nicht in der todoMap'); } }
[ "protected", "function", "assertTodo", "(", "$", "todo", "=", "NULL", ")", "{", "if", "(", "func_num_args", "(", ")", "==", "0", ")", "{", "$", "todo", "=", "$", "this", "->", "todo", ";", "}", "if", "(", "$", "todo", "!=", "NULL", "&&", "!", "...
Überprüft das Todo (oder das im Objekt gesetzte) und schmeisst eine invalidTodoException, wenn ddas todo gesetzt + falsch ist
[ "Überprüft", "das", "Todo", "(", "oder", "das", "im", "Objekt", "gesetzte", ")", "und", "schmeisst", "eine", "invalidTodoException", "wenn", "ddas", "todo", "gesetzt", "+", "falsch", "ist" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/CMS/Controller/BaseController.php#L192-L200
PortaText/php-sdk
src/PortaText/Command/Api/Contacts.php
Contacts.setAll
public function setAll($variables) { $vars = array(); foreach ($variables as $k => $v) { $vars[] = array('key' => $k, 'value' => $v); } return $this->setArgument("variables", $vars); }
php
public function setAll($variables) { $vars = array(); foreach ($variables as $k => $v) { $vars[] = array('key' => $k, 'value' => $v); } return $this->setArgument("variables", $vars); }
[ "public", "function", "setAll", "(", "$", "variables", ")", "{", "$", "vars", "=", "array", "(", ")", ";", "foreach", "(", "$", "variables", "as", "$", "k", "=>", "$", "v", ")", "{", "$", "vars", "[", "]", "=", "array", "(", "'key'", "=>", "$",...
Sets all the given variables. @param array $variables variables. @return PortaText\Command\ICommand
[ "Sets", "all", "the", "given", "variables", "." ]
train
https://github.com/PortaText/php-sdk/blob/dbe04ef043db5b251953f9de57aa4d0f1785dfcc/src/PortaText/Command/Api/Contacts.php#L87-L94
PortaText/php-sdk
src/PortaText/Command/Api/Contacts.php
Contacts.getEndpoint
protected function getEndpoint($method) { $number = $this->getArgument("number"); $this->delArgument("number"); $endpoint = "contacts"; if (!is_null($number)) { $endpoint .= "/$number/variables"; } $name = $this->getArgument("name"); if (!is_null($...
php
protected function getEndpoint($method) { $number = $this->getArgument("number"); $this->delArgument("number"); $endpoint = "contacts"; if (!is_null($number)) { $endpoint .= "/$number/variables"; } $name = $this->getArgument("name"); if (!is_null($...
[ "protected", "function", "getEndpoint", "(", "$", "method", ")", "{", "$", "number", "=", "$", "this", "->", "getArgument", "(", "\"number\"", ")", ";", "$", "this", "->", "delArgument", "(", "\"number\"", ")", ";", "$", "endpoint", "=", "\"contacts\"", ...
Returns a string with the endpoint for the given command. @param string $method Method for this command. @return string
[ "Returns", "a", "string", "with", "the", "endpoint", "for", "the", "given", "command", "." ]
train
https://github.com/PortaText/php-sdk/blob/dbe04ef043db5b251953f9de57aa4d0f1785dfcc/src/PortaText/Command/Api/Contacts.php#L127-L156
nexusnetsoftgmbh/nexuscli
src/Nexus/DockerClient/Business/Model/DockerCompose.php
DockerCompose.execute
public function execute(string $command): string { return $this->shellFacade->runCommand($this->command . ' ' . $command); }
php
public function execute(string $command): string { return $this->shellFacade->runCommand($this->command . ' ' . $command); }
[ "public", "function", "execute", "(", "string", "$", "command", ")", ":", "string", "{", "return", "$", "this", "->", "shellFacade", "->", "runCommand", "(", "$", "this", "->", "command", ".", "' '", ".", "$", "command", ")", ";", "}" ]
@param string $command @return string
[ "@param", "string", "$command" ]
train
https://github.com/nexusnetsoftgmbh/nexuscli/blob/8416b43d31ad56ea379ae2b0bf85d456e78ba67a/src/Nexus/DockerClient/Business/Model/DockerCompose.php#L39-L42
atkrad/data-tables
src/Extension/ColVis.php
ColVis.setLabel
public function setLabel($label) { $hash = sha1($label); $this->properties['label'] = $hash; $this->callbacks[$hash] = $label; return $this; }
php
public function setLabel($label) { $hash = sha1($label); $this->properties['label'] = $hash; $this->callbacks[$hash] = $label; return $this; }
[ "public", "function", "setLabel", "(", "$", "label", ")", "{", "$", "hash", "=", "sha1", "(", "$", "label", ")", ";", "$", "this", "->", "properties", "[", "'label'", "]", "=", "$", "hash", ";", "$", "this", "->", "callbacks", "[", "$", "hash", "...
Allows customisation of the labels used for the buttons (useful for stripping HTML for example). Input parameters: 1) int: The column index being operated on 2) string: The title detected by DataTables' automatic methods. 3) node: The TH element for the column Return parameter: string: The value to use for the bu...
[ "Allows", "customisation", "of", "the", "labels", "used", "for", "the", "buttons", "(", "useful", "for", "stripping", "HTML", "for", "example", ")", "." ]
train
https://github.com/atkrad/data-tables/blob/5afcc337ab624ca626e29d9674459c5105982b16/src/Extension/ColVis.php#L150-L157
atkrad/data-tables
src/Extension/ColVis.php
ColVis.setStateChange
public function setStateChange($stateChange) { $hash = sha1($stateChange); $this->properties['stateChange'] = $hash; $this->callbacks[$hash] = $stateChange; return $this; }
php
public function setStateChange($stateChange) { $hash = sha1($stateChange); $this->properties['stateChange'] = $hash; $this->callbacks[$hash] = $stateChange; return $this; }
[ "public", "function", "setStateChange", "(", "$", "stateChange", ")", "{", "$", "hash", "=", "sha1", "(", "$", "stateChange", ")", ";", "$", "this", "->", "properties", "[", "'stateChange'", "]", "=", "$", "hash", ";", "$", "this", "->", "callbacks", "...
Set callback function to let you know when the state has changed. @param callback $stateChange Callback function to let you know when the state has changed. @return ColVis @see http://datatables.net/extensions/colvis/options
[ "Set", "callback", "function", "to", "let", "you", "know", "when", "the", "state", "has", "changed", "." ]
train
https://github.com/atkrad/data-tables/blob/5afcc337ab624ca626e29d9674459c5105982b16/src/Extension/ColVis.php#L167-L174