id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
191,600
pravednik/xmlBundle
Model/XmlReader.php
XmlReader.convertToStringOrBoolean
protected function convertToStringOrBoolean($string) { $result = (string) $string; $lowerString = strtolower($result); if('true' === $lowerString) { $result = true; } elseif('false' === $lowerString) { $result = false; } ...
php
protected function convertToStringOrBoolean($string) { $result = (string) $string; $lowerString = strtolower($result); if('true' === $lowerString) { $result = true; } elseif('false' === $lowerString) { $result = false; } ...
[ "protected", "function", "convertToStringOrBoolean", "(", "$", "string", ")", "{", "$", "result", "=", "(", "string", ")", "$", "string", ";", "$", "lowerString", "=", "strtolower", "(", "$", "result", ")", ";", "if", "(", "'true'", "===", "$", "lowerStr...
Cast to string or to a boolean value if the string contains a true or false @param mixed $string @return boolean|string
[ "Cast", "to", "string", "or", "to", "a", "boolean", "value", "if", "the", "string", "contains", "a", "true", "or", "false" ]
fa3a0852097209eb6840ef01224b4ddb004790b5
https://github.com/pravednik/xmlBundle/blob/fa3a0852097209eb6840ef01224b4ddb004790b5/Model/XmlReader.php#L95-L110
191,601
nimmneun/onesheet
src/OneSheet/Size/FontMeta.php
FontMeta.readFontMetadata
public function readFontMetadata() { $fontHandle = fopen($this->fileName, "r"); $offset = $this->getNameTableOffset($fontHandle); fseek($fontHandle, $offset, SEEK_SET); $nameTableHeader = fread($fontHandle, 6); $numberOfRecords = $this->unpack(substr($nameTableHeader, 2, 2...
php
public function readFontMetadata() { $fontHandle = fopen($this->fileName, "r"); $offset = $this->getNameTableOffset($fontHandle); fseek($fontHandle, $offset, SEEK_SET); $nameTableHeader = fread($fontHandle, 6); $numberOfRecords = $this->unpack(substr($nameTableHeader, 2, 2...
[ "public", "function", "readFontMetadata", "(", ")", "{", "$", "fontHandle", "=", "fopen", "(", "$", "this", "->", "fileName", ",", "\"r\"", ")", ";", "$", "offset", "=", "$", "this", "->", "getNameTableOffset", "(", "$", "fontHandle", ")", ";", "fseek", ...
Read the font Metadata @throws \Exception
[ "Read", "the", "font", "Metadata" ]
2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32
https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Size/FontMeta.php#L94-L111
191,602
gushphp/gush
src/Factory/AdapterFactory.php
AdapterFactory.supports
public function supports($name, $supports) { if (!isset($this->adapters[$name])) { return false; } return $this->adapters[$name][$supports]; }
php
public function supports($name, $supports) { if (!isset($this->adapters[$name])) { return false; } return $this->adapters[$name][$supports]; }
[ "public", "function", "supports", "(", "$", "name", ",", "$", "supports", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "adapters", "[", "$", "name", "]", ")", ")", "{", "return", "false", ";", "}", "return", "$", "this", "->", "adap...
Returns whether the adapter by name supports the requirements. @param string $name @param string $supports @return bool
[ "Returns", "whether", "the", "adapter", "by", "name", "supports", "the", "requirements", "." ]
957940ac27c1734e112c4b1b3cbc905a2c97e701
https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Factory/AdapterFactory.php#L68-L75
191,603
gushphp/gush
src/Factory/AdapterFactory.php
AdapterFactory.get
public function get($name) { if (!isset($this->adapters[$name])) { throw new \InvalidArgumentException(sprintf('No Adapter with name "%s" is registered.', $name)); } return $this->adapters[$name]; }
php
public function get($name) { if (!isset($this->adapters[$name])) { throw new \InvalidArgumentException(sprintf('No Adapter with name "%s" is registered.', $name)); } return $this->adapters[$name]; }
[ "public", "function", "get", "(", "$", "name", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "adapters", "[", "$", "name", "]", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "sprintf", "(", "'No Adapter with name \"%s...
Returns the requested adapter-factory configuration. @param string $name @return array[]
[ "Returns", "the", "requested", "adapter", "-", "factory", "configuration", "." ]
957940ac27c1734e112c4b1b3cbc905a2c97e701
https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Factory/AdapterFactory.php#L112-L119
191,604
gushphp/gush
src/Factory/AdapterFactory.php
AdapterFactory.createConfigurator
public function createConfigurator($name, HelperSet $helperSet, Config $globalConfig) { return $this->getFactoryObject($name)->createConfigurator($helperSet, $globalConfig); }
php
public function createConfigurator($name, HelperSet $helperSet, Config $globalConfig) { return $this->getFactoryObject($name)->createConfigurator($helperSet, $globalConfig); }
[ "public", "function", "createConfigurator", "(", "$", "name", ",", "HelperSet", "$", "helperSet", ",", "Config", "$", "globalConfig", ")", "{", "return", "$", "this", "->", "getFactoryObject", "(", "$", "name", ")", "->", "createConfigurator", "(", "$", "hel...
Creates a new Configurator instance for the given adapter. @param string $name Name of the adapter (must be registered) @param HelperSet $helperSet HelperSet object @return Configurator
[ "Creates", "a", "new", "Configurator", "instance", "for", "the", "given", "adapter", "." ]
957940ac27c1734e112c4b1b3cbc905a2c97e701
https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Factory/AdapterFactory.php#L175-L178
191,605
gushphp/gush
src/Helper/DownloadHelper.php
DownloadHelper.downloadFile
public function downloadFile($url, $progress = true) { /** @var ProgressBar|null $progressBar */ $progressBar = null; $downloadCallback = function ($size, $downloaded, $client, $request, Response $response) use (&$progressBar) { // Don't initialize the progress bar for redirects ...
php
public function downloadFile($url, $progress = true) { /** @var ProgressBar|null $progressBar */ $progressBar = null; $downloadCallback = function ($size, $downloaded, $client, $request, Response $response) use (&$progressBar) { // Don't initialize the progress bar for redirects ...
[ "public", "function", "downloadFile", "(", "$", "url", ",", "$", "progress", "=", "true", ")", "{", "/** @var ProgressBar|null $progressBar */", "$", "progressBar", "=", "null", ";", "$", "downloadCallback", "=", "function", "(", "$", "size", ",", "$", "downlo...
Download a file from the URL to the destination. @param string $url Fully qualified URL to the file. @param bool $progress Show the progressbar when downloading.
[ "Download", "a", "file", "from", "the", "URL", "to", "the", "destination", "." ]
957940ac27c1734e112c4b1b3cbc905a2c97e701
https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/DownloadHelper.php#L72-L127
191,606
gushphp/gush
src/Helper/DownloadHelper.php
DownloadHelper.formatSize
private function formatSize($bytes) { $units = ['B', 'KB', 'MB', 'GB', 'TB']; $bytes = max($bytes, 0); $pow = $bytes ? floor(log($bytes, 1024)) : 0; $pow = min($pow, count($units) - 1); $bytes /= pow(1024, $pow); return number_format($bytes, 2).' '.$units[$pow]; ...
php
private function formatSize($bytes) { $units = ['B', 'KB', 'MB', 'GB', 'TB']; $bytes = max($bytes, 0); $pow = $bytes ? floor(log($bytes, 1024)) : 0; $pow = min($pow, count($units) - 1); $bytes /= pow(1024, $pow); return number_format($bytes, 2).' '.$units[$pow]; ...
[ "private", "function", "formatSize", "(", "$", "bytes", ")", "{", "$", "units", "=", "[", "'B'", ",", "'KB'", ",", "'MB'", ",", "'GB'", ",", "'TB'", "]", ";", "$", "bytes", "=", "max", "(", "$", "bytes", ",", "0", ")", ";", "$", "pow", "=", "...
Utility method to show the number of bytes in a readable format. @param int $bytes The number of bytes to format. @return string The human readable string of bytes (e.g. 4.32MB).
[ "Utility", "method", "to", "show", "the", "number", "of", "bytes", "in", "a", "readable", "format", "." ]
957940ac27c1734e112c4b1b3cbc905a2c97e701
https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/DownloadHelper.php#L155-L166
191,607
nimmneun/onesheet
src/OneSheet/Style/Style.php
Style.setSurroundingBorder
public function setSurroundingBorder($style = BorderStyle::THIN, $color = '000000') { $this->setBorderLeft($style, $color); $this->setBorderRight($style, $color); $this->setBorderTop($style, $color); $this->setBorderBottom($style, $color); return $this; }
php
public function setSurroundingBorder($style = BorderStyle::THIN, $color = '000000') { $this->setBorderLeft($style, $color); $this->setBorderRight($style, $color); $this->setBorderTop($style, $color); $this->setBorderBottom($style, $color); return $this; }
[ "public", "function", "setSurroundingBorder", "(", "$", "style", "=", "BorderStyle", "::", "THIN", ",", "$", "color", "=", "'000000'", ")", "{", "$", "this", "->", "setBorderLeft", "(", "$", "style", ",", "$", "color", ")", ";", "$", "this", "->", "set...
Convenience method to set all borders at once. @param string $style @param string $color @return Style
[ "Convenience", "method", "to", "set", "all", "borders", "at", "once", "." ]
2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32
https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Style/Style.php#L188-L195
191,608
gushphp/gush
src/ThirdParty/Bitbucket/ResultPager.php
ResultPager.fetch
public function fetch($result, $valuesKey = 'values') { if ('1.0' === $this->client->getApiVersion()) { return $this->fetchApi1($result, $valuesKey); } /** @var Request $request */ $request = $this->client->getLastRequest(); if (!array_key_exists('values', $resu...
php
public function fetch($result, $valuesKey = 'values') { if ('1.0' === $this->client->getApiVersion()) { return $this->fetchApi1($result, $valuesKey); } /** @var Request $request */ $request = $this->client->getLastRequest(); if (!array_key_exists('values', $resu...
[ "public", "function", "fetch", "(", "$", "result", ",", "$", "valuesKey", "=", "'values'", ")", "{", "if", "(", "'1.0'", "===", "$", "this", "->", "client", "->", "getApiVersion", "(", ")", ")", "{", "return", "$", "this", "->", "fetchApi1", "(", "$"...
Fetches all the results. @param array $result @param string $valuesKey @return array @throws \RuntimeException
[ "Fetches", "all", "the", "results", "." ]
957940ac27c1734e112c4b1b3cbc905a2c97e701
https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/ThirdParty/Bitbucket/ResultPager.php#L86-L125
191,609
gushphp/gush
src/ThirdParty/Bitbucket/ResultPager.php
ResultPager.fetchApi1
protected function fetchApi1($result, $valuesKey = 'values') { /** @var Request $request */ $request = $this->client->getLastRequest(); if (!array_key_exists($valuesKey, $result)) { throw new \RuntimeException( sprintf( 'No values-key "%s" fou...
php
protected function fetchApi1($result, $valuesKey = 'values') { /** @var Request $request */ $request = $this->client->getLastRequest(); if (!array_key_exists($valuesKey, $result)) { throw new \RuntimeException( sprintf( 'No values-key "%s" fou...
[ "protected", "function", "fetchApi1", "(", "$", "result", ",", "$", "valuesKey", "=", "'values'", ")", "{", "/** @var Request $request */", "$", "request", "=", "$", "this", "->", "client", "->", "getLastRequest", "(", ")", ";", "if", "(", "!", "array_key_ex...
Fetches all the results, using API version 1.0. @param array $result @param string $valuesKey @return array @throws \RuntimeException
[ "Fetches", "all", "the", "results", "using", "API", "version", "1", ".", "0", "." ]
957940ac27c1734e112c4b1b3cbc905a2c97e701
https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/ThirdParty/Bitbucket/ResultPager.php#L137-L184
191,610
backbee/backbee-php
Rest/Controller/MediaFolderController.php
MediaFolderController.getCollectionAction
public function getCollectionAction($start, MediaFolder $parent = null) { $mediaFolders = []; $results = $this->getMediaFolderRepository()->getMediaFolders($parent, [ 'field' => '_leftnode', 'dir' => 'asc', ]); foreach ($results as $folder) { ...
php
public function getCollectionAction($start, MediaFolder $parent = null) { $mediaFolders = []; $results = $this->getMediaFolderRepository()->getMediaFolders($parent, [ 'field' => '_leftnode', 'dir' => 'asc', ]); foreach ($results as $folder) { ...
[ "public", "function", "getCollectionAction", "(", "$", "start", ",", "MediaFolder", "$", "parent", "=", "null", ")", "{", "$", "mediaFolders", "=", "[", "]", ";", "$", "results", "=", "$", "this", "->", "getMediaFolderRepository", "(", ")", "->", "getMedia...
Get collection of media folder @return Response @Rest\Pagination(default_count=100, max_count=200) @Rest\ParamConverter( name="parent", id_name="parent_uid", id_source="query", class="BackBee\NestedNode\MediaFolder", required=false ) @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "Get", "collection", "of", "media", "folder" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/MediaFolderController.php#L65-L83
191,611
backbee/backbee-php
Rest/Controller/MediaFolderController.php
MediaFolderController.postAction
public function postAction(Request $request, $parent = null) { $title = trim($request->request->get('title')); if (!$this->isGranted('CREATE', $parent)) { throw new AccessDeniedHttpException(sprintf('You are not authorized to create %s MediaFolder.', $title)); } try { ...
php
public function postAction(Request $request, $parent = null) { $title = trim($request->request->get('title')); if (!$this->isGranted('CREATE', $parent)) { throw new AccessDeniedHttpException(sprintf('You are not authorized to create %s MediaFolder.', $title)); } try { ...
[ "public", "function", "postAction", "(", "Request", "$", "request", ",", "$", "parent", "=", "null", ")", "{", "$", "title", "=", "trim", "(", "$", "request", "->", "request", "->", "get", "(", "'title'", ")", ")", ";", "if", "(", "!", "$", "this",...
Create a media folder and if a parent is provided added has its last child @param MediaFolder $mediaFolder @Rest\RequestParam(name="title", description="media title", requirements={ @Assert\NotBlank() }) @Rest\ParamConverter( name="parent", id_name="parent_uid", id_source="request", class="BackBee\NestedNode\MediaFol...
[ "Create", "a", "media", "folder", "and", "if", "a", "parent", "is", "provided", "added", "has", "its", "last", "child" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/MediaFolderController.php#L177-L230
191,612
backbee/backbee-php
Rest/Controller/MediaFolderController.php
MediaFolderController.getAncestorsAction
public function getAncestorsAction(MediaFolder $folder) { $ancestors = $this->getMediaFolderRepository()->getAncestors($folder); return $this->createJsonResponse($ancestors); }
php
public function getAncestorsAction(MediaFolder $folder) { $ancestors = $this->getMediaFolderRepository()->getAncestors($folder); return $this->createJsonResponse($ancestors); }
[ "public", "function", "getAncestorsAction", "(", "MediaFolder", "$", "folder", ")", "{", "$", "ancestors", "=", "$", "this", "->", "getMediaFolderRepository", "(", ")", "->", "getAncestors", "(", "$", "folder", ")", ";", "return", "$", "this", "->", "createJ...
Get folder ancestors @param Folder $folder the folder we want to get its ancestors @return \Symfony\Component\HttpFoundation\Response @Rest\ParamConverter(name="folder", class="BackBee\NestedNode\MediaFolder")
[ "Get", "folder", "ancestors" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/MediaFolderController.php#L355-L360
191,613
backbee/backbee-php
Cache/CacheValidator.php
CacheValidator.addValidator
public function addValidator(ValidatorInterface $validator) { foreach ((array) $validator->getGroups() as $group_name) { if (false === array_key_exists($group_name, $this->validators)) { $this->validators[$group_name] = array(); } $this->validators[$group...
php
public function addValidator(ValidatorInterface $validator) { foreach ((array) $validator->getGroups() as $group_name) { if (false === array_key_exists($group_name, $this->validators)) { $this->validators[$group_name] = array(); } $this->validators[$group...
[ "public", "function", "addValidator", "(", "ValidatorInterface", "$", "validator", ")", "{", "foreach", "(", "(", "array", ")", "$", "validator", "->", "getGroups", "(", ")", "as", "$", "group_name", ")", "{", "if", "(", "false", "===", "array_key_exists", ...
Allows you to add validator. @param ValidatorInterface $validator the validator we want to add
[ "Allows", "you", "to", "add", "validator", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Cache/CacheValidator.php#L69-L78
191,614
backbee/backbee-php
Cache/CacheValidator.php
CacheValidator.isValid
public function isValid($group_name, $object = null) { if (false === $this->isValidGroup($group_name)) { throw new InvalidArgumentException("$group_name is not a valid cache validator group."); } $is_valid = true; foreach ($this->validators[$group_name] as $validator) { ...
php
public function isValid($group_name, $object = null) { if (false === $this->isValidGroup($group_name)) { throw new InvalidArgumentException("$group_name is not a valid cache validator group."); } $is_valid = true; foreach ($this->validators[$group_name] as $validator) { ...
[ "public", "function", "isValid", "(", "$", "group_name", ",", "$", "object", "=", "null", ")", "{", "if", "(", "false", "===", "$", "this", "->", "isValidGroup", "(", "$", "group_name", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"$...
It will invoke every validators of provided group name to define if current set is valid or not. @param string $group_name the validator group name to use @param mixed $object @return boolean return true if every validators return true, else false
[ "It", "will", "invoke", "every", "validators", "of", "provided", "group", "name", "to", "define", "if", "current", "set", "is", "valid", "or", "not", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Cache/CacheValidator.php#L88-L103
191,615
backbee/backbee-php
Rest/EventListener/ValidationListener.php
ValidationListener.setDefaultValues
protected function setDefaultValues(array $params, ParameterBag $values) { foreach ($params as $param) { if (!array_key_exists('default', $param) || null === $param['default']) { continue; } if (false === $values->has($param['name'])) { $v...
php
protected function setDefaultValues(array $params, ParameterBag $values) { foreach ($params as $param) { if (!array_key_exists('default', $param) || null === $param['default']) { continue; } if (false === $values->has($param['name'])) { $v...
[ "protected", "function", "setDefaultValues", "(", "array", "$", "params", ",", "ParameterBag", "$", "values", ")", "{", "foreach", "(", "$", "params", "as", "$", "param", ")", "{", "if", "(", "!", "array_key_exists", "(", "'default'", ",", "$", "param", ...
Set default values. @param array $params @param \Symfony\Component\HttpFoundation\ParameterBag $values
[ "Set", "default", "values", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/EventListener/ValidationListener.php#L131-L142
191,616
backbee/backbee-php
Rest/EventListener/ValidationListener.php
ValidationListener.validateParams
protected function validateParams(Validator $validator, array $params, ParameterBag $values) { $violations = new ConstraintViolationList(); foreach ($params as $param) { if (empty($param['requirements'])) { continue; } $value = $values->get($param[...
php
protected function validateParams(Validator $validator, array $params, ParameterBag $values) { $violations = new ConstraintViolationList(); foreach ($params as $param) { if (empty($param['requirements'])) { continue; } $value = $values->get($param[...
[ "protected", "function", "validateParams", "(", "Validator", "$", "validator", ",", "array", "$", "params", ",", "ParameterBag", "$", "values", ")", "{", "$", "violations", "=", "new", "ConstraintViolationList", "(", ")", ";", "foreach", "(", "$", "params", ...
Validate params. @param \Symfony\Component\Validator\Validator $validator @param array $params @param \Symfony\Component\HttpFoundation\ParameterBag $values @return \Symfony\Component\Validator\ConstraintViolationList
[ "Validate", "params", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/EventListener/ValidationListener.php#L153-L182
191,617
backbee/backbee-php
Security/Authentication/Provider/PublicKeyAuthenticationProvider.php
PublicKeyAuthenticationProvider.getRoles
private function getRoles(ApiUserInterface $user) { $roles = $user->getRoles(); if ($user->getApiKeyEnabled()) { $roles[] = $this->apiUserRole; } return $roles; }
php
private function getRoles(ApiUserInterface $user) { $roles = $user->getRoles(); if ($user->getApiKeyEnabled()) { $roles[] = $this->apiUserRole; } return $roles; }
[ "private", "function", "getRoles", "(", "ApiUserInterface", "$", "user", ")", "{", "$", "roles", "=", "$", "user", "->", "getRoles", "(", ")", ";", "if", "(", "$", "user", "->", "getApiKeyEnabled", "(", ")", ")", "{", "$", "roles", "[", "]", "=", "...
Add API user role to authenticated token @param ApiUserInterface $user @return array
[ "Add", "API", "user", "role", "to", "authenticated", "token" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Security/Authentication/Provider/PublicKeyAuthenticationProvider.php#L116-L124
191,618
czim/monolog-json-context
src/Formatters/PureJsonContextFormatter.php
PureJsonContextFormatter.formatContext
protected function formatContext(array $vars, array $context) { // Set top-level data in the 'context', merging to get those keys in front $context = array_merge([ 'timestamp' => $this->stringify($vars['datetime']), 'channel' => $this->stringify($vars['channel']), ...
php
protected function formatContext(array $vars, array $context) { // Set top-level data in the 'context', merging to get those keys in front $context = array_merge([ 'timestamp' => $this->stringify($vars['datetime']), 'channel' => $this->stringify($vars['channel']), ...
[ "protected", "function", "formatContext", "(", "array", "$", "vars", ",", "array", "$", "context", ")", "{", "// Set top-level data in the 'context', merging to get those keys in front", "$", "context", "=", "array_merge", "(", "[", "'timestamp'", "=>", "$", "this", "...
Formats the context array in the desired log format. @param array $vars @param array $context @return string
[ "Formats", "the", "context", "array", "in", "the", "desired", "log", "format", "." ]
6bb36320aacfbcc30114b44cccb72e24654bd44d
https://github.com/czim/monolog-json-context/blob/6bb36320aacfbcc30114b44cccb72e24654bd44d/src/Formatters/PureJsonContextFormatter.php#L50-L62
191,619
backbee/backbee-php
NestedNode/Repository/NestedNodeQueryBuilder.php
NestedNodeQueryBuilder.andLevelEquals
public function andLevelEquals($level, $alias = null) { list($alias, $suffix) = $this->getAliasAndSuffix($alias); return $this->andWhere($alias.'._level = :level'.$suffix) ->setParameter('level'.$suffix, $level); }
php
public function andLevelEquals($level, $alias = null) { list($alias, $suffix) = $this->getAliasAndSuffix($alias); return $this->andWhere($alias.'._level = :level'.$suffix) ->setParameter('level'.$suffix, $level); }
[ "public", "function", "andLevelEquals", "(", "$", "level", ",", "$", "alias", "=", "null", ")", "{", "list", "(", "$", "alias", ",", "$", "suffix", ")", "=", "$", "this", "->", "getAliasAndSuffix", "(", "$", "alias", ")", ";", "return", "$", "this", ...
Add query part to select nodes by level. @param int $level @param string $alias optional, the alias to use @return \BackBee\NestedNode\Repository\NestedNodeQueryBuilder
[ "Add", "query", "part", "to", "select", "nodes", "by", "level", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeQueryBuilder.php#L104-L110
191,620
backbee/backbee-php
NestedNode/Repository/NestedNodeQueryBuilder.php
NestedNodeQueryBuilder.andIsPreviousSiblingOf
public function andIsPreviousSiblingOf(AbstractNestedNode $node, $alias = null) { return $this->andRootIs($node->getRoot(), $alias) ->andRightnodeEquals($node->getLeftnode() - 1, $alias); }
php
public function andIsPreviousSiblingOf(AbstractNestedNode $node, $alias = null) { return $this->andRootIs($node->getRoot(), $alias) ->andRightnodeEquals($node->getLeftnode() - 1, $alias); }
[ "public", "function", "andIsPreviousSiblingOf", "(", "AbstractNestedNode", "$", "node", ",", "$", "alias", "=", "null", ")", "{", "return", "$", "this", "->", "andRootIs", "(", "$", "node", "->", "getRoot", "(", ")", ",", "$", "alias", ")", "->", "andRig...
Add query part to select previous sibling of node. @param \BackBee\NestedNode\AbstractNestedNode $node @param string $alias optional, the alias to use @return \BackBee\NestedNode\Repository\NestedNodeQueryBuilder
[ "Add", "query", "part", "to", "select", "previous", "sibling", "of", "node", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeQueryBuilder.php#L287-L291
191,621
backbee/backbee-php
NestedNode/Repository/NestedNodeQueryBuilder.php
NestedNodeQueryBuilder.andIsPreviousSiblingsOf
public function andIsPreviousSiblingsOf(AbstractNestedNode $node, $alias = null) { return $this->andParentIs($node->getParent(), $alias) ->andLeftnodeIsLowerThan($node->getLeftnode(), true, $alias); }
php
public function andIsPreviousSiblingsOf(AbstractNestedNode $node, $alias = null) { return $this->andParentIs($node->getParent(), $alias) ->andLeftnodeIsLowerThan($node->getLeftnode(), true, $alias); }
[ "public", "function", "andIsPreviousSiblingsOf", "(", "AbstractNestedNode", "$", "node", ",", "$", "alias", "=", "null", ")", "{", "return", "$", "this", "->", "andParentIs", "(", "$", "node", "->", "getParent", "(", ")", ",", "$", "alias", ")", "->", "a...
Add query part to select previous siblings of node. @param \BackBee\NestedNode\AbstractNestedNode $node @param string $alias optional, the alias to use @return \BackBee\NestedNode\Repository\NestedNodeQueryBuilder
[ "Add", "query", "part", "to", "select", "previous", "siblings", "of", "node", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeQueryBuilder.php#L300-L304
191,622
backbee/backbee-php
NestedNode/Repository/NestedNodeQueryBuilder.php
NestedNodeQueryBuilder.andIsNextSiblingOf
public function andIsNextSiblingOf(AbstractNestedNode $node, $alias = null) { return $this->andRootIs($node->getRoot(), $alias) ->andLeftnodeEquals($node->getRightnode() + 1, $alias); }
php
public function andIsNextSiblingOf(AbstractNestedNode $node, $alias = null) { return $this->andRootIs($node->getRoot(), $alias) ->andLeftnodeEquals($node->getRightnode() + 1, $alias); }
[ "public", "function", "andIsNextSiblingOf", "(", "AbstractNestedNode", "$", "node", ",", "$", "alias", "=", "null", ")", "{", "return", "$", "this", "->", "andRootIs", "(", "$", "node", "->", "getRoot", "(", ")", ",", "$", "alias", ")", "->", "andLeftnod...
Add query part to select next sibling of node. @param \BackBee\NestedNode\AbstractNestedNode $node @param string $alias optional, the alias to use @return \BackBee\NestedNode\Repository\NestedNodeQueryBuilder
[ "Add", "query", "part", "to", "select", "next", "sibling", "of", "node", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeQueryBuilder.php#L313-L317
191,623
backbee/backbee-php
NestedNode/Repository/NestedNodeQueryBuilder.php
NestedNodeQueryBuilder.andIsNextSiblingsOf
public function andIsNextSiblingsOf(AbstractNestedNode $node, $alias = null) { return $this->andParentIs($node->getParent(), $alias) ->andLeftnodeIsUpperThan($node->getRightnode(), true, $alias); }
php
public function andIsNextSiblingsOf(AbstractNestedNode $node, $alias = null) { return $this->andParentIs($node->getParent(), $alias) ->andLeftnodeIsUpperThan($node->getRightnode(), true, $alias); }
[ "public", "function", "andIsNextSiblingsOf", "(", "AbstractNestedNode", "$", "node", ",", "$", "alias", "=", "null", ")", "{", "return", "$", "this", "->", "andParentIs", "(", "$", "node", "->", "getParent", "(", ")", ",", "$", "alias", ")", "->", "andLe...
Add query part to select next siblings of node. @param \BackBee\NestedNode\AbstractNestedNode $node @param string $alias optional, the alias to use @return \BackBee\NestedNode\Repository\NestedNodeQueryBuilder
[ "Add", "query", "part", "to", "select", "next", "siblings", "of", "node", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeQueryBuilder.php#L326-L330
191,624
backbee/backbee-php
NestedNode/Repository/NestedNodeQueryBuilder.php
NestedNodeQueryBuilder.getAliasAndSuffix
protected function getAliasAndSuffix($alias = null) { $suffix = count($this->getParameters()); $alias = $this->getFirstAlias($alias); return array($alias, $suffix); }
php
protected function getAliasAndSuffix($alias = null) { $suffix = count($this->getParameters()); $alias = $this->getFirstAlias($alias); return array($alias, $suffix); }
[ "protected", "function", "getAliasAndSuffix", "(", "$", "alias", "=", "null", ")", "{", "$", "suffix", "=", "count", "(", "$", "this", "->", "getParameters", "(", ")", ")", ";", "$", "alias", "=", "$", "this", "->", "getFirstAlias", "(", "$", "alias", ...
Compute suffix and alias used by query part. @param string $alias @return array
[ "Compute", "suffix", "and", "alias", "used", "by", "query", "part", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeQueryBuilder.php#L467-L473
191,625
backbee/backbee-php
Rest/Controller/RevisionController.php
RevisionController.getAction
public function getAction(Revision $revision) { $this->granted('VIEW', $revision->getContent()); $response = $this->createJsonResponse(); $response->setData($revision->jsonSerialize(Revision::JSON_REVISION_FORMAT)); return $response; }
php
public function getAction(Revision $revision) { $this->granted('VIEW', $revision->getContent()); $response = $this->createJsonResponse(); $response->setData($revision->jsonSerialize(Revision::JSON_REVISION_FORMAT)); return $response; }
[ "public", "function", "getAction", "(", "Revision", "$", "revision", ")", "{", "$", "this", "->", "granted", "(", "'VIEW'", ",", "$", "revision", "->", "getContent", "(", ")", ")", ";", "$", "response", "=", "$", "this", "->", "createJsonResponse", "(", ...
Returns a revision. @return Symfony\Component\HttpFoundation\JsonResponse @Rest\ParamConverter(name="revision", class="BackBee\ClassContent\Revision") @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "Returns", "a", "revision", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/RevisionController.php#L52-L60
191,626
backbee/backbee-php
Rest/Controller/RevisionController.php
RevisionController.getCollectionByContentAction
public function getCollectionByContentAction($type, $uid, $start, $count) { $content = $this->findOneByTypeAndUid($type, $uid); $this->granted('VIEW', $content); $revisions = $this->getEntityManager() ->getRepository('BackBee\ClassContent\Revision') ->...
php
public function getCollectionByContentAction($type, $uid, $start, $count) { $content = $this->findOneByTypeAndUid($type, $uid); $this->granted('VIEW', $content); $revisions = $this->getEntityManager() ->getRepository('BackBee\ClassContent\Revision') ->...
[ "public", "function", "getCollectionByContentAction", "(", "$", "type", ",", "$", "uid", ",", "$", "start", ",", "$", "count", ")", "{", "$", "content", "=", "$", "this", "->", "findOneByTypeAndUid", "(", "$", "type", ",", "$", "uid", ")", ";", "$", ...
Returns collection of revisions for a content. @return Symfony\Component\HttpFoundation\JsonResponse @Rest\Pagination(default_count=25, max_count=100) @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "Returns", "collection", "of", "revisions", "for", "a", "content", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/RevisionController.php#L70-L93
191,627
backbee/backbee-php
ClassContent/Repository/RevisionRepository.php
RevisionRepository.update
public function update(Revision $revision) { switch ($revision->getState()) { case Revision::STATE_ADDED: throw new ClassContentException('Content is not versioned yet', ClassContentException::REVISION_ADDED); break; case Revision::STATE_MODIFIED: ...
php
public function update(Revision $revision) { switch ($revision->getState()) { case Revision::STATE_ADDED: throw new ClassContentException('Content is not versioned yet', ClassContentException::REVISION_ADDED); break; case Revision::STATE_MODIFIED: ...
[ "public", "function", "update", "(", "Revision", "$", "revision", ")", "{", "switch", "(", "$", "revision", "->", "getState", "(", ")", ")", "{", "case", "Revision", "::", "STATE_ADDED", ":", "throw", "new", "ClassContentException", "(", "'Content is not versi...
Update user revision. @param Revision $revision @return Revision @throws ClassContentException Occurs on illegal revision state
[ "Update", "user", "revision", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Repository/RevisionRepository.php#L94-L126
191,628
backbee/backbee-php
ClassContent/Repository/RevisionRepository.php
RevisionRepository.getDraft
public function getDraft(AbstractClassContent $content, BBUserToken $token, $checkoutOnMissing = false) { if (null === $revision = $content->getDraft()) { try { if (false === $this->_em->contains($content)) { $content = $this->_em->find(get_class($content), $c...
php
public function getDraft(AbstractClassContent $content, BBUserToken $token, $checkoutOnMissing = false) { if (null === $revision = $content->getDraft()) { try { if (false === $this->_em->contains($content)) { $content = $this->_em->find(get_class($content), $c...
[ "public", "function", "getDraft", "(", "AbstractClassContent", "$", "content", ",", "BBUserToken", "$", "token", ",", "$", "checkoutOnMissing", "=", "false", ")", "{", "if", "(", "null", "===", "$", "revision", "=", "$", "content", "->", "getDraft", "(", "...
Return the user's draft of a content, optionally checks out a new one if not exists. @param AbstractClassContent $content @param BBUserToken $token @param boolean $checkoutOnMissing If true, checks out a new revision if none was found @return Revision|null
[ "Return", "the", "user", "s", "draft", "of", "a", "content", "optionally", "checks", "out", "a", "new", "one", "if", "not", "exists", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Repository/RevisionRepository.php#L183-L228
191,629
backbee/backbee-php
ClassContent/Repository/RevisionRepository.php
RevisionRepository.getAllDrafts
public function getAllDrafts(TokenInterface $token) { $owner = UserSecurityIdentity::fromToken($token); $states = [Revision::STATE_ADDED, Revision::STATE_MODIFIED]; $result = []; try { $result = $this->findBy([ '_owner' => $owner, '_state...
php
public function getAllDrafts(TokenInterface $token) { $owner = UserSecurityIdentity::fromToken($token); $states = [Revision::STATE_ADDED, Revision::STATE_MODIFIED]; $result = []; try { $result = $this->findBy([ '_owner' => $owner, '_state...
[ "public", "function", "getAllDrafts", "(", "TokenInterface", "$", "token", ")", "{", "$", "owner", "=", "UserSecurityIdentity", "::", "fromToken", "(", "$", "token", ")", ";", "$", "states", "=", "[", "Revision", "::", "STATE_ADDED", ",", "Revision", "::", ...
Returns all current drafts for authenticated user. @param TokenInterface $token @return array
[ "Returns", "all", "current", "drafts", "for", "authenticated", "user", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Repository/RevisionRepository.php#L237-L277
191,630
backbee/backbee-php
ClassContent/Repository/RevisionRepository.php
RevisionRepository.checkContent
private function checkContent(Revision $revision) { $content = $revision->getContent(); if (null === $content || !($content instanceof AbstractClassContent)) { $this->_em->remove($revision); throw new ClassContentException('Orphan revision, deleted', ClassContentException::R...
php
private function checkContent(Revision $revision) { $content = $revision->getContent(); if (null === $content || !($content instanceof AbstractClassContent)) { $this->_em->remove($revision); throw new ClassContentException('Orphan revision, deleted', ClassContentException::R...
[ "private", "function", "checkContent", "(", "Revision", "$", "revision", ")", "{", "$", "content", "=", "$", "revision", "->", "getContent", "(", ")", ";", "if", "(", "null", "===", "$", "content", "||", "!", "(", "$", "content", "instanceof", "AbstractC...
Checks the content state of a revision. @param Revision $revision @return AbstractClassContent the valid content according to revision state @throws ClassContentException Occurs when the revision is orphan
[ "Checks", "the", "content", "state", "of", "a", "revision", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Repository/RevisionRepository.php#L352-L366
191,631
backbee/backbee-php
ClassContent/Iconizer/ChainIconizer.php
ChainIconizer.getIcon
public function getIcon(AbstractContent $content) { $iconUri = null; foreach ($this->iconizers as $iconizer) { if (null !== $iconUri = $iconizer->getIcon($content)) { break; } } return $iconUri; }
php
public function getIcon(AbstractContent $content) { $iconUri = null; foreach ($this->iconizers as $iconizer) { if (null !== $iconUri = $iconizer->getIcon($content)) { break; } } return $iconUri; }
[ "public", "function", "getIcon", "(", "AbstractContent", "$", "content", ")", "{", "$", "iconUri", "=", "null", ";", "foreach", "(", "$", "this", "->", "iconizers", "as", "$", "iconizer", ")", "{", "if", "(", "null", "!==", "$", "iconUri", "=", "$", ...
Returns the URL of the icon of the provided content. @param AbstractContent $content The content. @return string|null The icon URL if found.
[ "Returns", "the", "URL", "of", "the", "icon", "of", "the", "provided", "content", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Iconizer/ChainIconizer.php#L70-L79
191,632
backbee/backbee-php
DependencyInjection/Dumper/PhpArrayDumper.php
PhpArrayDumper.dump
public function dump(array $options = []) { $compiled = false; if (isset($options['do_compile']) && true === $options['do_compile']) { $this->container->compile(); $compiled = true; } $dumper = [ 'parameters' => $this->dumpContainerParameters($...
php
public function dump(array $options = []) { $compiled = false; if (isset($options['do_compile']) && true === $options['do_compile']) { $this->container->compile(); $compiled = true; } $dumper = [ 'parameters' => $this->dumpContainerParameters($...
[ "public", "function", "dump", "(", "array", "$", "options", "=", "[", "]", ")", "{", "$", "compiled", "=", "false", ";", "if", "(", "isset", "(", "$", "options", "[", "'do_compile'", "]", ")", "&&", "true", "===", "$", "options", "[", "'do_compile'",...
Dumps the service container. @param array $options An array of options @return string The representation of the service container
[ "Dumps", "the", "service", "container", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/DependencyInjection/Dumper/PhpArrayDumper.php#L72-L88
191,633
backbee/backbee-php
DependencyInjection/Dumper/PhpArrayDumper.php
PhpArrayDumper.dumpContainerDefinitions
private function dumpContainerDefinitions(array $options) { $definitions = []; foreach ($this->container->getDefinitions() as $key => $definition) { $definitions[$key] = $this->convertDefinitionToPhpArray($definition); $this->tryHydrateDefinitionForRestoration($key, $definiti...
php
private function dumpContainerDefinitions(array $options) { $definitions = []; foreach ($this->container->getDefinitions() as $key => $definition) { $definitions[$key] = $this->convertDefinitionToPhpArray($definition); $this->tryHydrateDefinitionForRestoration($key, $definiti...
[ "private", "function", "dumpContainerDefinitions", "(", "array", "$", "options", ")", "{", "$", "definitions", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "container", "->", "getDefinitions", "(", ")", "as", "$", "key", "=>", "$", "definition", ...
Dumps every container definitions into array. @param array $options @return array contains every container definitions converted to array
[ "Dumps", "every", "container", "definitions", "into", "array", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/DependencyInjection/Dumper/PhpArrayDumper.php#L109-L118
191,634
backbee/backbee-php
DependencyInjection/Dumper/PhpArrayDumper.php
PhpArrayDumper.dumpContainerAliases
private function dumpContainerAliases(array $options) { $aliases = []; foreach ($this->container->getAliases() as $id => $alias) { $aliases[$id] = $alias->__toString(); } return $aliases; }
php
private function dumpContainerAliases(array $options) { $aliases = []; foreach ($this->container->getAliases() as $id => $alias) { $aliases[$id] = $alias->__toString(); } return $aliases; }
[ "private", "function", "dumpContainerAliases", "(", "array", "$", "options", ")", "{", "$", "aliases", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "container", "->", "getAliases", "(", ")", "as", "$", "id", "=>", "$", "alias", ")", "{", "$...
Dumps every container aliases into array. @param array $options @return array contains container aliases
[ "Dumps", "every", "container", "aliases", "into", "array", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/DependencyInjection/Dumper/PhpArrayDumper.php#L127-L135
191,635
backbee/backbee-php
DependencyInjection/Dumper/PhpArrayDumper.php
PhpArrayDumper.convertDefinitionToPhpArray
private function convertDefinitionToPhpArray(Definition $definition) { $definitionArray = []; if ($definition->isSynthetic()) { $definitionArray = $this->convertSyntheticDefinitionToPhpArray($definition); } $this->hydrateDefinitionClass($definition, $definitionArray); ...
php
private function convertDefinitionToPhpArray(Definition $definition) { $definitionArray = []; if ($definition->isSynthetic()) { $definitionArray = $this->convertSyntheticDefinitionToPhpArray($definition); } $this->hydrateDefinitionClass($definition, $definitionArray); ...
[ "private", "function", "convertDefinitionToPhpArray", "(", "Definition", "$", "definition", ")", "{", "$", "definitionArray", "=", "[", "]", ";", "if", "(", "$", "definition", "->", "isSynthetic", "(", ")", ")", "{", "$", "definitionArray", "=", "$", "this",...
Convert a single definition entity into array. @param Definition $definition the definition to convert @return array the definition converted into array
[ "Convert", "a", "single", "definition", "entity", "into", "array", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/DependencyInjection/Dumper/PhpArrayDumper.php#L144-L164
191,636
backbee/backbee-php
DependencyInjection/Dumper/PhpArrayDumper.php
PhpArrayDumper.hydrateDefinitionClass
private function hydrateDefinitionClass(Definition $definition, array &$definitionArray) { if (null !== $definition->getClass()) { $definitionArray['class'] = $definition->getClass(); } }
php
private function hydrateDefinitionClass(Definition $definition, array &$definitionArray) { if (null !== $definition->getClass()) { $definitionArray['class'] = $definition->getClass(); } }
[ "private", "function", "hydrateDefinitionClass", "(", "Definition", "$", "definition", ",", "array", "&", "$", "definitionArray", ")", "{", "if", "(", "null", "!==", "$", "definition", "->", "getClass", "(", ")", ")", "{", "$", "definitionArray", "[", "'clas...
Try to hydrate definition class from entity into definition array. @param Definition $definition the definition to convert @param array $definitionArray the definition array (passed by reference)
[ "Try", "to", "hydrate", "definition", "class", "from", "entity", "into", "definition", "array", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/DependencyInjection/Dumper/PhpArrayDumper.php#L184-L189
191,637
backbee/backbee-php
DependencyInjection/Dumper/PhpArrayDumper.php
PhpArrayDumper.hydrateDefinitionArguments
private function hydrateDefinitionArguments(Definition $definition, array &$definitionArray) { foreach ($definition->getArguments() as $arg) { $definitionArray['arguments'][] = $this->convertArgument($arg); } }
php
private function hydrateDefinitionArguments(Definition $definition, array &$definitionArray) { foreach ($definition->getArguments() as $arg) { $definitionArray['arguments'][] = $this->convertArgument($arg); } }
[ "private", "function", "hydrateDefinitionArguments", "(", "Definition", "$", "definition", ",", "array", "&", "$", "definitionArray", ")", "{", "foreach", "(", "$", "definition", "->", "getArguments", "(", ")", "as", "$", "arg", ")", "{", "$", "definitionArray...
Try to hydrate definition arguments from entity into definition array. @param Definition $definition the definition to convert @param array $definitionArray the definition array (passed by reference)
[ "Try", "to", "hydrate", "definition", "arguments", "from", "entity", "into", "definition", "array", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/DependencyInjection/Dumper/PhpArrayDumper.php#L197-L202
191,638
backbee/backbee-php
DependencyInjection/Dumper/PhpArrayDumper.php
PhpArrayDumper.hydrateDefinitionFactory
private function hydrateDefinitionFactory(Definition $definition, array &$definitionArray) { if (null !== $definition->getFactory()) { foreach ($definition->getFactory() as $argument) { $definitionArray['factory'][] = $this->convertArgument($argument); } } ...
php
private function hydrateDefinitionFactory(Definition $definition, array &$definitionArray) { if (null !== $definition->getFactory()) { foreach ($definition->getFactory() as $argument) { $definitionArray['factory'][] = $this->convertArgument($argument); } } ...
[ "private", "function", "hydrateDefinitionFactory", "(", "Definition", "$", "definition", ",", "array", "&", "$", "definitionArray", ")", "{", "if", "(", "null", "!==", "$", "definition", "->", "getFactory", "(", ")", ")", "{", "foreach", "(", "$", "definitio...
Try to hydrate definition factory from entity into definition array. @param Definition $definition @param array &$definitionArray @return [type]
[ "Try", "to", "hydrate", "definition", "factory", "from", "entity", "into", "definition", "array", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/DependencyInjection/Dumper/PhpArrayDumper.php#L211-L218
191,639
backbee/backbee-php
DependencyInjection/Dumper/PhpArrayDumper.php
PhpArrayDumper.hydrateDefinitionTags
private function hydrateDefinitionTags(Definition $definition, array &$definitionArray) { foreach ($definition->getTags() as $key => $tag) { $definitionTag = [ 'name' => $key, ]; foreach (array_shift($tag) as $key => $option) { $definition...
php
private function hydrateDefinitionTags(Definition $definition, array &$definitionArray) { foreach ($definition->getTags() as $key => $tag) { $definitionTag = [ 'name' => $key, ]; foreach (array_shift($tag) as $key => $option) { $definition...
[ "private", "function", "hydrateDefinitionTags", "(", "Definition", "$", "definition", ",", "array", "&", "$", "definitionArray", ")", "{", "foreach", "(", "$", "definition", "->", "getTags", "(", ")", "as", "$", "key", "=>", "$", "tag", ")", "{", "$", "d...
Hydrate definition tags from entity into definition array. @param Definition $definition the definition to convert @param array $definitionArray the definition array (passed by reference)
[ "Hydrate", "definition", "tags", "from", "entity", "into", "definition", "array", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/DependencyInjection/Dumper/PhpArrayDumper.php#L240-L253
191,640
backbee/backbee-php
DependencyInjection/Dumper/PhpArrayDumper.php
PhpArrayDumper.hydrateDefinitionMethodCalls
private function hydrateDefinitionMethodCalls(Definition $definition, array &$definitionArray) { foreach ($definition->getMethodCalls() as $methodToCall) { $method_call_array = []; // retrieving method to call name $method_name = array_shift($methodToCall); $...
php
private function hydrateDefinitionMethodCalls(Definition $definition, array &$definitionArray) { foreach ($definition->getMethodCalls() as $methodToCall) { $method_call_array = []; // retrieving method to call name $method_name = array_shift($methodToCall); $...
[ "private", "function", "hydrateDefinitionMethodCalls", "(", "Definition", "$", "definition", ",", "array", "&", "$", "definitionArray", ")", "{", "foreach", "(", "$", "definition", "->", "getMethodCalls", "(", ")", "as", "$", "methodToCall", ")", "{", "$", "me...
Hydrate definition array method calls with definition entity. @param Definition $definition the definition to convert @param array $definitionArray the definition array (passed by reference)
[ "Hydrate", "definition", "array", "method", "calls", "with", "definition", "entity", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/DependencyInjection/Dumper/PhpArrayDumper.php#L261-L281
191,641
backbee/backbee-php
DependencyInjection/Dumper/PhpArrayDumper.php
PhpArrayDumper.hydrateDefinitionConfigurator
private function hydrateDefinitionConfigurator(Definition $definition, array &$definitionArray) { if (null !== $configurator = $definition->getConfigurator()) { if (is_string($configurator)) { $definitionArray['configurator'] = $definition->getConfigurator(); } else {...
php
private function hydrateDefinitionConfigurator(Definition $definition, array &$definitionArray) { if (null !== $configurator = $definition->getConfigurator()) { if (is_string($configurator)) { $definitionArray['configurator'] = $definition->getConfigurator(); } else {...
[ "private", "function", "hydrateDefinitionConfigurator", "(", "Definition", "$", "definition", ",", "array", "&", "$", "definitionArray", ")", "{", "if", "(", "null", "!==", "$", "configurator", "=", "$", "definition", "->", "getConfigurator", "(", ")", ")", "{...
Try to hydrate definition array method calls with definition entity. @param Definition $definition the definition to convert @param array $definitionArray the definition array (passed by reference)
[ "Try", "to", "hydrate", "definition", "array", "method", "calls", "with", "definition", "entity", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/DependencyInjection/Dumper/PhpArrayDumper.php#L289-L298
191,642
backbee/backbee-php
DependencyInjection/Dumper/PhpArrayDumper.php
PhpArrayDumper.hydrateDefinitionScopeProperty
private function hydrateDefinitionScopeProperty(Definition $definition, array &$definitionArray) { if (ContainerInterface::SCOPE_CONTAINER !== $definition->getScope()) { $definitionArray['scope'] = $definition->getScope(); } }
php
private function hydrateDefinitionScopeProperty(Definition $definition, array &$definitionArray) { if (ContainerInterface::SCOPE_CONTAINER !== $definition->getScope()) { $definitionArray['scope'] = $definition->getScope(); } }
[ "private", "function", "hydrateDefinitionScopeProperty", "(", "Definition", "$", "definition", ",", "array", "&", "$", "definitionArray", ")", "{", "if", "(", "ContainerInterface", "::", "SCOPE_CONTAINER", "!==", "$", "definition", "->", "getScope", "(", ")", ")",...
Try to hydrate definition scope property from entity into definition array. @param Definition $definition the definition to convert @param array $definitionArray the definition array (passed by reference)
[ "Try", "to", "hydrate", "definition", "scope", "property", "from", "entity", "into", "definition", "array", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/DependencyInjection/Dumper/PhpArrayDumper.php#L319-L324
191,643
backbee/backbee-php
DependencyInjection/Dumper/PhpArrayDumper.php
PhpArrayDumper.hydrateDefinitionFileProperty
private function hydrateDefinitionFileProperty(Definition $definition, array &$definitionArray) { if (null !== $definition->getFile()) { $definitionArray['file'] = $definition->getFile(); } }
php
private function hydrateDefinitionFileProperty(Definition $definition, array &$definitionArray) { if (null !== $definition->getFile()) { $definitionArray['file'] = $definition->getFile(); } }
[ "private", "function", "hydrateDefinitionFileProperty", "(", "Definition", "$", "definition", ",", "array", "&", "$", "definitionArray", ")", "{", "if", "(", "null", "!==", "$", "definition", "->", "getFile", "(", ")", ")", "{", "$", "definitionArray", "[", ...
Try to hydrate definition file property from entity into definition array. @param Definition $definition the definition to convert @param array $definitionArray the definition array (passed by reference)
[ "Try", "to", "hydrate", "definition", "file", "property", "from", "entity", "into", "definition", "array", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/DependencyInjection/Dumper/PhpArrayDumper.php#L358-L363
191,644
EloGank/lol-replay-downloader
src/EloGank/Replay/Downloader/ReplayDownloader.php
ReplayDownloader.download
public function download( $region, $gameId, $encryptionKey, OutputInterface $output = null, $isOverride = false, $isAsync = false, $consolePath = null ) { // Check if exists if (!$this->client->isGameExists($region, $gameId)) { thro...
php
public function download( $region, $gameId, $encryptionKey, OutputInterface $output = null, $isOverride = false, $isAsync = false, $consolePath = null ) { // Check if exists if (!$this->client->isGameExists($region, $gameId)) { thro...
[ "public", "function", "download", "(", "$", "region", ",", "$", "gameId", ",", "$", "encryptionKey", ",", "OutputInterface", "$", "output", "=", "null", ",", "$", "isOverride", "=", "false", ",", "$", "isAsync", "=", "false", ",", "$", "consolePath", "="...
Download a replay. If the asynchronous parameter is set to "true", make sure the CLI dependency is installed : @see https://github.com/EloGank/lol-replay-downloader-cli @param string $region @param int $gameId @param string $encryptionKey @param null|OutputInterface $outp...
[ "Download", "a", "replay", "." ]
f5e61deb331ac5a863dcb69af115aba75611bc0e
https://github.com/EloGank/lol-replay-downloader/blob/f5e61deb331ac5a863dcb69af115aba75611bc0e/src/EloGank/Replay/Downloader/ReplayDownloader.php#L80-L131
191,645
backbee/backbee-php
ClassContent/Listener/IndexationListener.php
IndexationListener.updateIdxSiteContents
private static function updateIdxSiteContents(array $contents_inserted, array $contents_removed) { if (null === $site = self::$_application->getSite()) { return; } self::$em->getRepository('BackBee\ClassContent\Indexes\IdxContentContent') ->replaceIdxSiteContents...
php
private static function updateIdxSiteContents(array $contents_inserted, array $contents_removed) { if (null === $site = self::$_application->getSite()) { return; } self::$em->getRepository('BackBee\ClassContent\Indexes\IdxContentContent') ->replaceIdxSiteContents...
[ "private", "static", "function", "updateIdxSiteContents", "(", "array", "$", "contents_inserted", ",", "array", "$", "contents_removed", ")", "{", "if", "(", "null", "===", "$", "site", "=", "self", "::", "$", "_application", "->", "getSite", "(", ")", ")", ...
Updates the site-content indexes for the scheduled AbstractClassContent. @param array $contents_inserted @param array $contents_removed
[ "Updates", "the", "site", "-", "content", "indexes", "for", "the", "scheduled", "AbstractClassContent", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Listener/IndexationListener.php#L77-L88
191,646
backbee/backbee-php
ClassContent/Listener/IndexationListener.php
IndexationListener.updateIdxContentContents
private static function updateIdxContentContents(array $contents_saved, array $contents_removed) { if (null === self::$_application->getSite()) { return; } self::$em->getRepository('BackBee\ClassContent\Indexes\IdxContentContent') ->replaceIdxContentContents(arra...
php
private static function updateIdxContentContents(array $contents_saved, array $contents_removed) { if (null === self::$_application->getSite()) { return; } self::$em->getRepository('BackBee\ClassContent\Indexes\IdxContentContent') ->replaceIdxContentContents(arra...
[ "private", "static", "function", "updateIdxContentContents", "(", "array", "$", "contents_saved", ",", "array", "$", "contents_removed", ")", "{", "if", "(", "null", "===", "self", "::", "$", "_application", "->", "getSite", "(", ")", ")", "{", "return", ";"...
Updates the content-content indexes for the scheduled AbstractClassContent. @param array $contents_saved @param array $contents_removed
[ "Updates", "the", "content", "-", "content", "indexes", "for", "the", "scheduled", "AbstractClassContent", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Listener/IndexationListener.php#L96-L107
191,647
backbee/backbee-php
ClassContent/Listener/IndexationListener.php
IndexationListener.getApplication
private static function getApplication(Event $event) { if (null === self::$_application) { if (null !== $event->getDispatcher()) { self::$_application = $event->getDispatcher()->getApplication(); } } return self::$_application; }
php
private static function getApplication(Event $event) { if (null === self::$_application) { if (null !== $event->getDispatcher()) { self::$_application = $event->getDispatcher()->getApplication(); } } return self::$_application; }
[ "private", "static", "function", "getApplication", "(", "Event", "$", "event", ")", "{", "if", "(", "null", "===", "self", "::", "$", "_application", ")", "{", "if", "(", "null", "!==", "$", "event", "->", "getDispatcher", "(", ")", ")", "{", "self", ...
Returns the current application. @param Event $event @return \BackBee\BBApplication
[ "Returns", "the", "current", "application", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Listener/IndexationListener.php#L128-L137
191,648
backbee/backbee-php
ClassContent/Listener/IndexationListener.php
IndexationListener.getEntityManager
private static function getEntityManager(Event $event) { if (null === self::$em) { if (null !== self::getApplication($event)) { self::$em = self::getApplication($event)->getEntityManager(); } } return self::$em; }
php
private static function getEntityManager(Event $event) { if (null === self::$em) { if (null !== self::getApplication($event)) { self::$em = self::getApplication($event)->getEntityManager(); } } return self::$em; }
[ "private", "static", "function", "getEntityManager", "(", "Event", "$", "event", ")", "{", "if", "(", "null", "===", "self", "::", "$", "em", ")", "{", "if", "(", "null", "!==", "self", "::", "getApplication", "(", "$", "event", ")", ")", "{", "self"...
Returns the current entity manager. @param Event $event @return EntityManager
[ "Returns", "the", "current", "entity", "manager", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Listener/IndexationListener.php#L146-L155
191,649
backbee/backbee-php
ClassContent/Listener/IndexationListener.php
IndexationListener.onFlushContent
public static function onFlushContent(Event $event) { if (null === self::getEntityManager($event)) { return; } $contents_inserted = ScheduledEntities::getScheduledAClassContentInsertions(self::$em, true, true); $contents_updated = ScheduledEntities::getScheduledAClassCon...
php
public static function onFlushContent(Event $event) { if (null === self::getEntityManager($event)) { return; } $contents_inserted = ScheduledEntities::getScheduledAClassContentInsertions(self::$em, true, true); $contents_updated = ScheduledEntities::getScheduledAClassCon...
[ "public", "static", "function", "onFlushContent", "(", "Event", "$", "event", ")", "{", "if", "(", "null", "===", "self", "::", "getEntityManager", "(", "$", "event", ")", ")", "{", "return", ";", "}", "$", "contents_inserted", "=", "ScheduledEntities", ":...
Updates every indexed value assocatied to the contents flushed. @param Event $event
[ "Updates", "every", "indexed", "value", "assocatied", "to", "the", "contents", "flushed", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Listener/IndexationListener.php#L162-L210
191,650
backbee/backbee-php
ClassContent/Listener/IndexationListener.php
IndexationListener.getIndexValue
private static function getIndexValue(AbstractClassContent $content, $indexedField) { if ('@' === substr($indexedField, 0, 1)) { // parameter indexation return self::getParamValue($content, substr($indexedField, 1)); } else { // element indexation retu...
php
private static function getIndexValue(AbstractClassContent $content, $indexedField) { if ('@' === substr($indexedField, 0, 1)) { // parameter indexation return self::getParamValue($content, substr($indexedField, 1)); } else { // element indexation retu...
[ "private", "static", "function", "getIndexValue", "(", "AbstractClassContent", "$", "content", ",", "$", "indexedField", ")", "{", "if", "(", "'@'", "===", "substr", "(", "$", "indexedField", ",", "0", ",", "1", ")", ")", "{", "// parameter indexation", "ret...
Returns the indexed value. @param AbstractClassContent $content The content flushed. @param string $indexedField The parameter to index. @return array An array of the value and the content owner.
[ "Returns", "the", "indexed", "value", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Listener/IndexationListener.php#L274-L283
191,651
backbee/backbee-php
ClassContent/Listener/IndexationListener.php
IndexationListener.getParamValue
private static function getParamValue(AbstractClassContent $content, $indexedParam) { $value = (array) $content->getParamValue($indexedParam); $owner = $content; return [implode(',', $value), $owner]; }
php
private static function getParamValue(AbstractClassContent $content, $indexedParam) { $value = (array) $content->getParamValue($indexedParam); $owner = $content; return [implode(',', $value), $owner]; }
[ "private", "static", "function", "getParamValue", "(", "AbstractClassContent", "$", "content", ",", "$", "indexedParam", ")", "{", "$", "value", "=", "(", "array", ")", "$", "content", "->", "getParamValue", "(", "$", "indexedParam", ")", ";", "$", "owner", ...
Returns the indexed parameter value. @param AbstractClassContent $content The content flushed. @param string $indexedParam The parameter to index. @return array An array of the parameter value and the content owner.
[ "Returns", "the", "indexed", "parameter", "value", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Listener/IndexationListener.php#L305-L311
191,652
backbee/backbee-php
ClassContent/Listener/IndexationListener.php
IndexationListener.getContentValue
private static function getContentValue(AbstractClassContent $content, $indexedElement) { $value = $owner = $content; $elements = explode('->', $indexedElement); foreach ($elements as $element) { $value = $value->getData($element); if (!$value instanceof AbstractClass...
php
private static function getContentValue(AbstractClassContent $content, $indexedElement) { $value = $owner = $content; $elements = explode('->', $indexedElement); foreach ($elements as $element) { $value = $value->getData($element); if (!$value instanceof AbstractClass...
[ "private", "static", "function", "getContentValue", "(", "AbstractClassContent", "$", "content", ",", "$", "indexedElement", ")", "{", "$", "value", "=", "$", "owner", "=", "$", "content", ";", "$", "elements", "=", "explode", "(", "'->'", ",", "$", "index...
Returns the indexed value of an element. @param AbstractClassContent $content The content flushed. @param string $indexedElement The parameter to index. @return array An array of the element value and the content owner.
[ "Returns", "the", "indexed", "value", "of", "an", "element", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Listener/IndexationListener.php#L321-L339
191,653
backbee/backbee-php
ClassContent/Listener/IndexationListener.php
IndexationListener.applyCallbacks
private static function applyCallbacks($value, array $callbacks) { foreach ($callbacks as $callback) { $value = call_user_func($callback, $value); } return $value; }
php
private static function applyCallbacks($value, array $callbacks) { foreach ($callbacks as $callback) { $value = call_user_func($callback, $value); } return $value; }
[ "private", "static", "function", "applyCallbacks", "(", "$", "value", ",", "array", "$", "callbacks", ")", "{", "foreach", "(", "$", "callbacks", "as", "$", "callback", ")", "{", "$", "value", "=", "call_user_func", "(", "$", "callback", ",", "$", "value...
Applies callbacks to value. @param mixed $value The value on which apply callbacks. @param array $callbacks An array of callable function. @return mixed The new value.
[ "Applies", "callbacks", "to", "value", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Listener/IndexationListener.php#L349-L356
191,654
backbee/backbee-php
Rewriting/UrlGenerator.php
UrlGenerator.getDiscriminators
public function getDiscriminators() { if (null === $this->descriminators) { $this->descriminators = []; if (array_key_exists('_content_', $this->schemes)) { foreach (array_keys($this->schemes['_content_']) as $descriminator) { $this->descriminator...
php
public function getDiscriminators() { if (null === $this->descriminators) { $this->descriminators = []; if (array_key_exists('_content_', $this->schemes)) { foreach (array_keys($this->schemes['_content_']) as $descriminator) { $this->descriminator...
[ "public", "function", "getDiscriminators", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "descriminators", ")", "{", "$", "this", "->", "descriminators", "=", "[", "]", ";", "if", "(", "array_key_exists", "(", "'_content_'", ",", "$", "this...
Returns the list of class content names used by one of schemes Dynamically add a listener on descrimator.onflush event to RewritingListener. @return array
[ "Returns", "the", "list", "of", "class", "content", "names", "used", "by", "one", "of", "schemes", "Dynamically", "add", "a", "listener", "on", "descrimator", ".", "onflush", "event", "to", "RewritingListener", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rewriting/UrlGenerator.php#L167-L191
191,655
backbee/backbee-php
Rewriting/UrlGenerator.php
UrlGenerator.generate
public function generate(Page $page, AbstractClassContent $content = null, $force = false, $exceptionOnMissingScheme = true) { if (!is_bool($force)) { throw new \InvalidArgumentException(sprintf( '%s method expect `force parameter` to be type of boolean, %s given', ...
php
public function generate(Page $page, AbstractClassContent $content = null, $force = false, $exceptionOnMissingScheme = true) { if (!is_bool($force)) { throw new \InvalidArgumentException(sprintf( '%s method expect `force parameter` to be type of boolean, %s given', ...
[ "public", "function", "generate", "(", "Page", "$", "page", ",", "AbstractClassContent", "$", "content", "=", "null", ",", "$", "force", "=", "false", ",", "$", "exceptionOnMissingScheme", "=", "true", ")", "{", "if", "(", "!", "is_bool", "(", "$", "forc...
Generates and returns url for the provided page. @param Page $page The page to generate its url @param AbstractClassContent $content The optional main content of the page @return string
[ "Generates", "and", "returns", "url", "for", "the", "provided", "page", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rewriting/UrlGenerator.php#L200-L252
191,656
backbee/backbee-php
Rewriting/UrlGenerator.php
UrlGenerator.getUniqueness
public function getUniqueness(Page $page, $url) { if (!$this->preserveUnicity) { return $url; } $pageRepository = $this->application->getEntityManager()->getRepository('BackBee\NestedNode\Page'); if (null === $pageRepository->findOneBy(['_url' => $url, '_root' => $page->...
php
public function getUniqueness(Page $page, $url) { if (!$this->preserveUnicity) { return $url; } $pageRepository = $this->application->getEntityManager()->getRepository('BackBee\NestedNode\Page'); if (null === $pageRepository->findOneBy(['_url' => $url, '_root' => $page->...
[ "public", "function", "getUniqueness", "(", "Page", "$", "page", ",", "$", "url", ")", "{", "if", "(", "!", "$", "this", "->", "preserveUnicity", ")", "{", "return", "$", "url", ";", "}", "$", "pageRepository", "=", "$", "this", "->", "application", ...
Checks for the uniqueness of the URL and postfixe it if need. @param \BackBee\NestedNode\Page $page The page @param string &$url The reference of the generated URL
[ "Checks", "for", "the", "uniqueness", "of", "the", "URL", "and", "postfixe", "it", "if", "need", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rewriting/UrlGenerator.php#L260-L315
191,657
backbee/backbee-php
Rewriting/UrlGenerator.php
UrlGenerator.doGenerate
private function doGenerate($scheme, Page $page, AbstractClassContent $content = null) { $replacement = [ '$parent' => $page->isRoot() ? '' : $page->getParent()->getUrl(false), '$title' => StringUtils::urlize($page->getTitle()), '$datetime' => $page->getCreated()->fo...
php
private function doGenerate($scheme, Page $page, AbstractClassContent $content = null) { $replacement = [ '$parent' => $page->isRoot() ? '' : $page->getParent()->getUrl(false), '$title' => StringUtils::urlize($page->getTitle()), '$datetime' => $page->getCreated()->fo...
[ "private", "function", "doGenerate", "(", "$", "scheme", ",", "Page", "$", "page", ",", "AbstractClassContent", "$", "content", "=", "null", ")", "{", "$", "replacement", "=", "[", "'$parent'", "=>", "$", "page", "->", "isRoot", "(", ")", "?", "''", ":...
Computes the URL of a page according to a scheme. @param array $scheme The scheme to apply @param Page $page The page @param AbstractClassContent $content The optionnal main content of the page @return string The generated URL
[ "Computes", "the", "URL", "of", "a", "page", "according", "to", "a", "scheme", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rewriting/UrlGenerator.php#L325-L368
191,658
backbee/backbee-php
Console/Command/CreateWebsiteCommand.php
CreateWebsiteCommand.runSitesYmlProcess
protected function runSitesYmlProcess() { $sitesConf = $this->bbapp->getConfig()->getSitesConfig(); if ($this->siteDomain === null) { throw new \InvalidArgumentException('This site domain is not valid (empty value)'); } if (is_array($sitesConf) && array_key_exists($this...
php
protected function runSitesYmlProcess() { $sitesConf = $this->bbapp->getConfig()->getSitesConfig(); if ($this->siteDomain === null) { throw new \InvalidArgumentException('This site domain is not valid (empty value)'); } if (is_array($sitesConf) && array_key_exists($this...
[ "protected", "function", "runSitesYmlProcess", "(", ")", "{", "$", "sitesConf", "=", "$", "this", "->", "bbapp", "->", "getConfig", "(", ")", "->", "getSitesConfig", "(", ")", ";", "if", "(", "$", "this", "->", "siteDomain", "===", "null", ")", "{", "t...
Create new site entry inside sites.yml file @return CreateWebsiteCommand
[ "Create", "new", "site", "entry", "inside", "sites", ".", "yml", "file" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/CreateWebsiteCommand.php#L155-L181
191,659
backbee/backbee-php
Console/Command/CreateWebsiteCommand.php
CreateWebsiteCommand.runLayoutsGenerationProcess
protected function runLayoutsGenerationProcess() { # Website creation if (null === $site = $this->entyMgr->find('BackBee\Site\Site', md5($this->siteLabel))) { $site = $this->createSite($this->siteLabel, $this->siteDomain); } $this->bbapp->getContainer()->set('site', $site...
php
protected function runLayoutsGenerationProcess() { # Website creation if (null === $site = $this->entyMgr->find('BackBee\Site\Site', md5($this->siteLabel))) { $site = $this->createSite($this->siteLabel, $this->siteDomain); } $this->bbapp->getContainer()->set('site', $site...
[ "protected", "function", "runLayoutsGenerationProcess", "(", ")", "{", "# Website creation", "if", "(", "null", "===", "$", "site", "=", "$", "this", "->", "entyMgr", "->", "find", "(", "'BackBee\\Site\\Site'", ",", "md5", "(", "$", "this", "->", "siteLabel", ...
Create new site db entry, home layout, root page mediacenter and keyword @return CreateSudoerCommand
[ "Create", "new", "site", "db", "entry", "home", "layout", "root", "page", "mediacenter", "and", "keyword" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/CreateWebsiteCommand.php#L188-L217
191,660
backbee/backbee-php
Console/Command/CreateWebsiteCommand.php
CreateWebsiteCommand.createSite
private function createSite($siteLabel, $siteDomain) { $site = new \BackBee\Site\Site(md5($this->siteLabel)); $site ->setLabel($siteLabel) ->setServerName($siteDomain) ; $this->entyMgr->persist($site); $this->entyMgr->flush($site); return $sit...
php
private function createSite($siteLabel, $siteDomain) { $site = new \BackBee\Site\Site(md5($this->siteLabel)); $site ->setLabel($siteLabel) ->setServerName($siteDomain) ; $this->entyMgr->persist($site); $this->entyMgr->flush($site); return $sit...
[ "private", "function", "createSite", "(", "$", "siteLabel", ",", "$", "siteDomain", ")", "{", "$", "site", "=", "new", "\\", "BackBee", "\\", "Site", "\\", "Site", "(", "md5", "(", "$", "this", "->", "siteLabel", ")", ")", ";", "$", "site", "->", "...
Create new site db entry @param string $siteLabel Site label @param string $siteDomain Site domain @return \BackBee\Site\Site
[ "Create", "new", "site", "db", "entry" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/CreateWebsiteCommand.php#L250-L261
191,661
backbee/backbee-php
Console/Command/CreateWebsiteCommand.php
CreateWebsiteCommand.createRootPage
private function createRootPage($site, $layout) { $pagebuilder = $this->bbapp->getContainer()->get('pagebuilder'); $pagebuilder ->setUid(md5('root-' . $site->getLabel())) ->setTitle('Home') ->setLayout($layout) ->setSite($site) ->setUrl('/'...
php
private function createRootPage($site, $layout) { $pagebuilder = $this->bbapp->getContainer()->get('pagebuilder'); $pagebuilder ->setUid(md5('root-' . $site->getLabel())) ->setTitle('Home') ->setLayout($layout) ->setSite($site) ->setUrl('/'...
[ "private", "function", "createRootPage", "(", "$", "site", ",", "$", "layout", ")", "{", "$", "pagebuilder", "=", "$", "this", "->", "bbapp", "->", "getContainer", "(", ")", "->", "get", "(", "'pagebuilder'", ")", ";", "$", "pagebuilder", "->", "setUid",...
Create new root page @param \BackBee\Site\Site $site Site object @param \BackBee\Site\Layout $layout Layout object @return \BackBee\NestedNode\Page
[ "Create", "new", "root", "page" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/CreateWebsiteCommand.php#L271-L288
191,662
backbee/backbee-php
Console/Command/CreateWebsiteCommand.php
CreateWebsiteCommand.createHomeLayout
private function createHomeLayout($site) { $layout = new \BackBee\Site\Layout(md5('defaultlayout-' . $site->getLabel())); $layout ->setData('{"templateLayouts":[{"title":"Top column","layoutSize":{"height":300,"width":false},"gridSizeInfos":{"colWidth":60,"gutterWidth":20},"id":"Layout__...
php
private function createHomeLayout($site) { $layout = new \BackBee\Site\Layout(md5('defaultlayout-' . $site->getLabel())); $layout ->setData('{"templateLayouts":[{"title":"Top column","layoutSize":{"height":300,"width":false},"gridSizeInfos":{"colWidth":60,"gutterWidth":20},"id":"Layout__...
[ "private", "function", "createHomeLayout", "(", "$", "site", ")", "{", "$", "layout", "=", "new", "\\", "BackBee", "\\", "Site", "\\", "Layout", "(", "md5", "(", "'defaultlayout-'", ".", "$", "site", "->", "getLabel", "(", ")", ")", ")", ";", "$", "l...
Create new home layout @param \BackBee\Site\Site $site Site object @return \BackBee\Site\Layout
[ "Create", "new", "home", "layout" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/CreateWebsiteCommand.php#L297-L310
191,663
backbee/backbee-php
Event/Listener/CacheListener.php
CacheListener.onPreRenderContent
public function onPreRenderContent(RendererEvent $event) { // Checks if content caching is available $this->object = $event->getTarget(); if (false === ($this->object instanceof AbstractClassContent) || false === $this->checkCacheContentEvent()) { return; } $ren...
php
public function onPreRenderContent(RendererEvent $event) { // Checks if content caching is available $this->object = $event->getTarget(); if (false === ($this->object instanceof AbstractClassContent) || false === $this->checkCacheContentEvent()) { return; } $ren...
[ "public", "function", "onPreRenderContent", "(", "RendererEvent", "$", "event", ")", "{", "// Checks if content caching is available", "$", "this", "->", "object", "=", "$", "event", "->", "getTarget", "(", ")", ";", "if", "(", "false", "===", "(", "$", "this"...
Looks for available cached data before rendering a content. @param \BackBee\Event\Event $event
[ "Looks", "for", "available", "cached", "data", "before", "rendering", "a", "content", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/CacheListener.php#L157-L182
191,664
backbee/backbee-php
Event/Listener/CacheListener.php
CacheListener.onPostRenderContent
public function onPostRenderContent(RendererEvent $event) { // Checks if content caching is available $this->object = $event->getTarget(); if (false === ($this->object instanceof AbstractClassContent) || false === $this->checkCacheContentEvent()) { return; } $ren...
php
public function onPostRenderContent(RendererEvent $event) { // Checks if content caching is available $this->object = $event->getTarget(); if (false === ($this->object instanceof AbstractClassContent) || false === $this->checkCacheContentEvent()) { return; } $ren...
[ "public", "function", "onPostRenderContent", "(", "RendererEvent", "$", "event", ")", "{", "// Checks if content caching is available", "$", "this", "->", "object", "=", "$", "event", "->", "getTarget", "(", ")", ";", "if", "(", "false", "===", "(", "$", "this...
Saves in cache the rendered cache data. @param \BackBee\Event\Event $event
[ "Saves", "in", "cache", "the", "rendered", "cache", "data", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/CacheListener.php#L189-L225
191,665
backbee/backbee-php
Event/Listener/CacheListener.php
CacheListener.onFlushContent
public function onFlushContent(Event $event) { // Checks if page caching is available $this->object = $event->getTarget(); if (false === ($this->object instanceof AbstractClassContent) || false === $this->checkCacheContentEvent(false)) { return; } $parent_uids = ...
php
public function onFlushContent(Event $event) { // Checks if page caching is available $this->object = $event->getTarget(); if (false === ($this->object instanceof AbstractClassContent) || false === $this->checkCacheContentEvent(false)) { return; } $parent_uids = ...
[ "public", "function", "onFlushContent", "(", "Event", "$", "event", ")", "{", "// Checks if page caching is available", "$", "this", "->", "object", "=", "$", "event", "->", "getTarget", "(", ")", ";", "if", "(", "false", "===", "(", "$", "this", "->", "ob...
Clears cached data associated to the content to be flushed. @param \BackBee\Event\Event $event
[ "Clears", "cached", "data", "associated", "to", "the", "content", "to", "be", "flushed", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/CacheListener.php#L232-L271
191,666
backbee/backbee-php
Event/Listener/CacheListener.php
CacheListener.onPreRenderPage
public function onPreRenderPage(RendererEvent $event) { // Checks if page caching is available $this->object = $event->getTarget(); if (false === ($this->object instanceof Page) || false === $this->checkCachePageEvent()) { return; } // Checks if cache data is av...
php
public function onPreRenderPage(RendererEvent $event) { // Checks if page caching is available $this->object = $event->getTarget(); if (false === ($this->object instanceof Page) || false === $this->checkCachePageEvent()) { return; } // Checks if cache data is av...
[ "public", "function", "onPreRenderPage", "(", "RendererEvent", "$", "event", ")", "{", "// Checks if page caching is available", "$", "this", "->", "object", "=", "$", "event", "->", "getTarget", "(", ")", ";", "if", "(", "false", "===", "(", "$", "this", "-...
Looks for available cached data before rendering a page. @param \BackBee\Event\Event $event
[ "Looks", "for", "available", "cached", "data", "before", "rendering", "a", "page", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/CacheListener.php#L278-L303
191,667
backbee/backbee-php
Event/Listener/CacheListener.php
CacheListener.onPostRenderPage
public function onPostRenderPage(RendererEvent $event) { // Checks if page caching is available $this->object = $event->getTarget(); if (false === ($this->object instanceof Page) || false === $this->checkCachePageEvent()) { return; } // Checks if cache_id is avai...
php
public function onPostRenderPage(RendererEvent $event) { // Checks if page caching is available $this->object = $event->getTarget(); if (false === ($this->object instanceof Page) || false === $this->checkCachePageEvent()) { return; } // Checks if cache_id is avai...
[ "public", "function", "onPostRenderPage", "(", "RendererEvent", "$", "event", ")", "{", "// Checks if page caching is available", "$", "this", "->", "object", "=", "$", "event", "->", "getTarget", "(", ")", ";", "if", "(", "false", "===", "(", "$", "this", "...
Saves in cache the rendered page data. @param \BackBee\Event\Event $event
[ "Saves", "in", "cache", "the", "rendered", "page", "data", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/CacheListener.php#L310-L341
191,668
backbee/backbee-php
Event/Listener/CacheListener.php
CacheListener.onFlushPage
public function onFlushPage(Event $event) { // Checks if page caching is available $this->object = $event->getTarget(); if (false === ($this->object instanceof Page) || false === $this->checkCachePageEvent(false)) { return; } if (true === $this->page_cache_deleti...
php
public function onFlushPage(Event $event) { // Checks if page caching is available $this->object = $event->getTarget(); if (false === ($this->object instanceof Page) || false === $this->checkCachePageEvent(false)) { return; } if (true === $this->page_cache_deleti...
[ "public", "function", "onFlushPage", "(", "Event", "$", "event", ")", "{", "// Checks if page caching is available", "$", "this", "->", "object", "=", "$", "event", "->", "getTarget", "(", ")", ";", "if", "(", "false", "===", "(", "$", "this", "->", "objec...
Clears cached data associated to the page to be flushed. @param \BackBee\Event\Event $event
[ "Clears", "cached", "data", "associated", "to", "the", "page", "to", "be", "flushed", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/CacheListener.php#L348-L379
191,669
backbee/backbee-php
Event/Listener/CacheListener.php
CacheListener.checkCacheContentEvent
private function checkCacheContentEvent($check_status = true) { // Checks if a service cache-control exists if (null === $this->cache_content) { return false; } // Checks if the target event is not a main contentset if ( $this->object instanceof Conte...
php
private function checkCacheContentEvent($check_status = true) { // Checks if a service cache-control exists if (null === $this->cache_content) { return false; } // Checks if the target event is not a main contentset if ( $this->object instanceof Conte...
[ "private", "function", "checkCacheContentEvent", "(", "$", "check_status", "=", "true", ")", "{", "// Checks if a service cache-control exists", "if", "(", "null", "===", "$", "this", "->", "cache_content", ")", "{", "return", "false", ";", "}", "// Checks if the ta...
Checks the event and system validity then returns the content target, FALSE otherwise. @param \BackBee\Event\Event $event @param bool $check_status @return bool
[ "Checks", "the", "event", "and", "system", "validity", "then", "returns", "the", "content", "target", "FALSE", "otherwise", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/CacheListener.php#L389-L406
191,670
backbee/backbee-php
Event/Listener/CacheListener.php
CacheListener.checkCachePageEvent
private function checkCachePageEvent($check_status = true) { return null !== $this->cache_page && true === $this->validator->isValid('page', $this->application->getRequest()->getUri()) && ( true === $check_status ? $this->validator->isValid('cache_...
php
private function checkCachePageEvent($check_status = true) { return null !== $this->cache_page && true === $this->validator->isValid('page', $this->application->getRequest()->getUri()) && ( true === $check_status ? $this->validator->isValid('cache_...
[ "private", "function", "checkCachePageEvent", "(", "$", "check_status", "=", "true", ")", "{", "return", "null", "!==", "$", "this", "->", "cache_page", "&&", "true", "===", "$", "this", "->", "validator", "->", "isValid", "(", "'page'", ",", "$", "this", ...
Checks the event and system validity then returns the page target, FALSE otherwise. @param \BackBee\Event\Event $event @param bool $check_status @return bool
[ "Checks", "the", "event", "and", "system", "validity", "then", "returns", "the", "page", "target", "FALSE", "otherwise", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/CacheListener.php#L416-L426
191,671
backbee/backbee-php
Event/Listener/CacheListener.php
CacheListener.getContentCacheId
private function getContentCacheId(AbstractRenderer $renderer) { $cache_id = $this->identifier_generator->compute( 'content', $this->object->getUid().'-'.$renderer->getMode(), $renderer ); return md5('_content_'.$cache_id); }
php
private function getContentCacheId(AbstractRenderer $renderer) { $cache_id = $this->identifier_generator->compute( 'content', $this->object->getUid().'-'.$renderer->getMode(), $renderer ); return md5('_content_'.$cache_id); }
[ "private", "function", "getContentCacheId", "(", "AbstractRenderer", "$", "renderer", ")", "{", "$", "cache_id", "=", "$", "this", "->", "identifier_generator", "->", "compute", "(", "'content'", ",", "$", "this", "->", "object", "->", "getUid", "(", ")", "....
Return the cache id for the current rendered content. @return string|FALSE
[ "Return", "the", "cache", "id", "for", "the", "current", "rendered", "content", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/CacheListener.php#L433-L441
191,672
Fakerino/Fakerino
src/Fakerino/Core/Filler/EntityFiller.php
EntityFiller.fillProperties
public function fillProperties() { $entity = $this->entity; $entityInfo = new EntityInfo($entity); $entityProperties = $entityInfo->getProperties(); foreach ($entityProperties as $property) { $propertyName = $property->getName(); $fakeData = $this->faker->fake...
php
public function fillProperties() { $entity = $this->entity; $entityInfo = new EntityInfo($entity); $entityProperties = $entityInfo->getProperties(); foreach ($entityProperties as $property) { $propertyName = $property->getName(); $fakeData = $this->faker->fake...
[ "public", "function", "fillProperties", "(", ")", "{", "$", "entity", "=", "$", "this", "->", "entity", ";", "$", "entityInfo", "=", "new", "EntityInfo", "(", "$", "entity", ")", ";", "$", "entityProperties", "=", "$", "entityInfo", "->", "getProperties", ...
Fills properties.
[ "Fills", "properties", "." ]
920df67f1813950c56c011bb2b3c1bbbd42d9390
https://github.com/Fakerino/Fakerino/blob/920df67f1813950c56c011bb2b3c1bbbd42d9390/src/Fakerino/Core/Filler/EntityFiller.php#L51-L65
191,673
Fakerino/Fakerino
src/Fakerino/Core/Filler/EntityFiller.php
EntityFiller.fillMethods
public function fillMethods() { $entity = $this->entity; $entityInfo = new EntityInfo($entity); $entityMethods = $entityInfo->getSetters(); foreach ($entityMethods as $methods) { $methodsName = $methods->getName(); $nameToFake = substr($methodsName, 3, strlen(...
php
public function fillMethods() { $entity = $this->entity; $entityInfo = new EntityInfo($entity); $entityMethods = $entityInfo->getSetters(); foreach ($entityMethods as $methods) { $methodsName = $methods->getName(); $nameToFake = substr($methodsName, 3, strlen(...
[ "public", "function", "fillMethods", "(", ")", "{", "$", "entity", "=", "$", "this", "->", "entity", ";", "$", "entityInfo", "=", "new", "EntityInfo", "(", "$", "entity", ")", ";", "$", "entityMethods", "=", "$", "entityInfo", "->", "getSetters", "(", ...
Fills mehtods.
[ "Fills", "mehtods", "." ]
920df67f1813950c56c011bb2b3c1bbbd42d9390
https://github.com/Fakerino/Fakerino/blob/920df67f1813950c56c011bb2b3c1bbbd42d9390/src/Fakerino/Core/Filler/EntityFiller.php#L70-L85
191,674
Fakerino/Fakerino
src/Fakerino/Core/Filler/DbFiller.php
DbFiller.fill
public function fill() { $totalColumn = $this->db->getTotalColumns(); $rows = array(); for ($n = 0; $n < $this->num; $n++) { $fakeRow = new DbRowEntity(); for ($i = 0; $i < $totalColumn; $i++) { if ($this->db->isColumnAutoincrement($i)) { ...
php
public function fill() { $totalColumn = $this->db->getTotalColumns(); $rows = array(); for ($n = 0; $n < $this->num; $n++) { $fakeRow = new DbRowEntity(); for ($i = 0; $i < $totalColumn; $i++) { if ($this->db->isColumnAutoincrement($i)) { ...
[ "public", "function", "fill", "(", ")", "{", "$", "totalColumn", "=", "$", "this", "->", "db", "->", "getTotalColumns", "(", ")", ";", "$", "rows", "=", "array", "(", ")", ";", "for", "(", "$", "n", "=", "0", ";", "$", "n", "<", "$", "this", ...
Fills the tablename with fake value. @return array
[ "Fills", "the", "tablename", "with", "fake", "value", "." ]
920df67f1813950c56c011bb2b3c1bbbd42d9390
https://github.com/Fakerino/Fakerino/blob/920df67f1813950c56c011bb2b3c1bbbd42d9390/src/Fakerino/Core/Filler/DbFiller.php#L61-L84
191,675
backbee/backbee-php
Security/Listeners/LogoutListener.php
LogoutListener.handle
public function handle(GetResponseEvent $event) { $request = $event->getRequest(); $response = $this->successHandler->onLogoutSuccess($request); if (!$response instanceof Response) { throw new \RuntimeException('Logout Success Handler did not return a Response.'); } ...
php
public function handle(GetResponseEvent $event) { $request = $event->getRequest(); $response = $this->successHandler->onLogoutSuccess($request); if (!$response instanceof Response) { throw new \RuntimeException('Logout Success Handler did not return a Response.'); } ...
[ "public", "function", "handle", "(", "GetResponseEvent", "$", "event", ")", "{", "$", "request", "=", "$", "event", "->", "getRequest", "(", ")", ";", "$", "response", "=", "$", "this", "->", "successHandler", "->", "onLogoutSuccess", "(", "$", "request", ...
Performs the logout if requested. @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event A GetResponseEvent instance @throws RuntimeException if the LogoutSuccessHandlerInterface instance does not return a response
[ "Performs", "the", "logout", "if", "requested", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Security/Listeners/LogoutListener.php#L104-L122
191,676
Fakerino/Fakerino
src/Fakerino/DataSource/FakeFileContainer.php
FakeFileContainer.get
public static function get($filePath) { $fileName = basename($filePath); if (!array_key_exists($fileName, static::$files)) { try { $file = new File($filePath); } catch (\Exception $e) { $file = false; } static::$files[$...
php
public static function get($filePath) { $fileName = basename($filePath); if (!array_key_exists($fileName, static::$files)) { try { $file = new File($filePath); } catch (\Exception $e) { $file = false; } static::$files[$...
[ "public", "static", "function", "get", "(", "$", "filePath", ")", "{", "$", "fileName", "=", "basename", "(", "$", "filePath", ")", ";", "if", "(", "!", "array_key_exists", "(", "$", "fileName", ",", "static", "::", "$", "files", ")", ")", "{", "try"...
Gets a file from container, or create a new one if not present. @param string $filePath @return File
[ "Gets", "a", "file", "from", "container", "or", "create", "a", "new", "one", "if", "not", "present", "." ]
920df67f1813950c56c011bb2b3c1bbbd42d9390
https://github.com/Fakerino/Fakerino/blob/920df67f1813950c56c011bb2b3c1bbbd42d9390/src/Fakerino/DataSource/FakeFileContainer.php#L48-L62
191,677
backbee/backbee-php
Console/Command/CreateSudoerCommand.php
CreateSudoerCommand.runInsertSudoerProcess
protected function runInsertSudoerProcess() { if (!$this->input->getOption('user_name') || !$this->input->getOption('user_password') || !$this->input->getOption('user_email')) { $this->output->writeln('<info>You have to specify all option in order to insert a new superadmin user (--user_name, -...
php
protected function runInsertSudoerProcess() { if (!$this->input->getOption('user_name') || !$this->input->getOption('user_password') || !$this->input->getOption('user_email')) { $this->output->writeln('<info>You have to specify all option in order to insert a new superadmin user (--user_name, -...
[ "protected", "function", "runInsertSudoerProcess", "(", ")", "{", "if", "(", "!", "$", "this", "->", "input", "->", "getOption", "(", "'user_name'", ")", "||", "!", "$", "this", "->", "input", "->", "getOption", "(", "'user_password'", ")", "||", "!", "$...
Insert the user in DB and security.yml file @return CreateSudoerCommand
[ "Insert", "the", "user", "in", "DB", "and", "security", ".", "yml", "file" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/CreateSudoerCommand.php#L119-L152
191,678
backbee/backbee-php
Console/Command/CreateSudoerCommand.php
CreateSudoerCommand.createUser
private function createUser($login, $password, $email) { $encoderFactory = $this->bbapp->getContainer()->get('security.context')->getEncoderFactory(); $adminUser = new \BackBee\Security\User( $login, $password, 'SuperAdmin', 'SuperAdmin' ); ...
php
private function createUser($login, $password, $email) { $encoderFactory = $this->bbapp->getContainer()->get('security.context')->getEncoderFactory(); $adminUser = new \BackBee\Security\User( $login, $password, 'SuperAdmin', 'SuperAdmin' ); ...
[ "private", "function", "createUser", "(", "$", "login", ",", "$", "password", ",", "$", "email", ")", "{", "$", "encoderFactory", "=", "$", "this", "->", "bbapp", "->", "getContainer", "(", ")", "->", "get", "(", "'security.context'", ")", "->", "getEnco...
Create new superadmin user @param string $login User name @param string $password User password @param string $email User email @return \BackBee\Security\User The user object
[ "Create", "new", "superadmin", "user" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/CreateSudoerCommand.php#L163-L190
191,679
backbee/backbee-php
Console/Command/UpdateUsersRightsCommand.php
UpdateUsersRightsCommand.checkAclTables
private function checkAclTables() { $this->writeln('<info>Checking ACL tables</info>', OutputInterface::VERBOSITY_VERBOSE); $this->write(' - ACL tables - ', false, OutputInterface::VERBOSITY_VERY_VERBOSE); $schemaManager = $this->em->getConnection()->getSchemaManager(); $dropTableS...
php
private function checkAclTables() { $this->writeln('<info>Checking ACL tables</info>', OutputInterface::VERBOSITY_VERBOSE); $this->write(' - ACL tables - ', false, OutputInterface::VERBOSITY_VERY_VERBOSE); $schemaManager = $this->em->getConnection()->getSchemaManager(); $dropTableS...
[ "private", "function", "checkAclTables", "(", ")", "{", "$", "this", "->", "writeln", "(", "'<info>Checking ACL tables</info>'", ",", "OutputInterface", "::", "VERBOSITY_VERBOSE", ")", ";", "$", "this", "->", "write", "(", "' - ACL tables - '", ",", "false", ",", ...
Checks ACL tables, creates them if they don't exit. @return UpdateUsersRightsCommand
[ "Checks", "ACL", "tables", "creates", "them", "if", "they", "don", "t", "exit", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/UpdateUsersRightsCommand.php#L331-L373
191,680
backbee/backbee-php
Console/Command/UpdateUsersRightsCommand.php
UpdateUsersRightsCommand.checksTable
private function checksTable($classname, array $fields) { $schemaManager = $this->em->getConnection()->getSchemaManager(); $metadata = $this->em->getClassMetadata($classname); $tableName = $metadata->getTableName(); $this->writeln(sprintf('<info>Checking %s table</info>', $tableName...
php
private function checksTable($classname, array $fields) { $schemaManager = $this->em->getConnection()->getSchemaManager(); $metadata = $this->em->getClassMetadata($classname); $tableName = $metadata->getTableName(); $this->writeln(sprintf('<info>Checking %s table</info>', $tableName...
[ "private", "function", "checksTable", "(", "$", "classname", ",", "array", "$", "fields", ")", "{", "$", "schemaManager", "=", "$", "this", "->", "em", "->", "getConnection", "(", ")", "->", "getSchemaManager", "(", ")", ";", "$", "metadata", "=", "$", ...
Checks for an existing table for entity. @param string $classname @param array $fields @return UpdateUsersRightsCommand @throws \RuntimeException
[ "Checks", "for", "an", "existing", "table", "for", "entity", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/UpdateUsersRightsCommand.php#L385-L415
191,681
backbee/backbee-php
Console/Command/UpdateUsersRightsCommand.php
UpdateUsersRightsCommand.cleanTables
private function cleanTables(InputInterface $input) { $aclOnly = true; if ($input->getOption('clean')) { $this->writeln('<info>Deleting current users and groups.</info>', OutputInterface::VERBOSITY_VERBOSE); if (OutputInterface::VERBOSITY_QUIET < $this->output->getVerbosity(...
php
private function cleanTables(InputInterface $input) { $aclOnly = true; if ($input->getOption('clean')) { $this->writeln('<info>Deleting current users and groups.</info>', OutputInterface::VERBOSITY_VERBOSE); if (OutputInterface::VERBOSITY_QUIET < $this->output->getVerbosity(...
[ "private", "function", "cleanTables", "(", "InputInterface", "$", "input", ")", "{", "$", "aclOnly", "=", "true", ";", "if", "(", "$", "input", "->", "getOption", "(", "'clean'", ")", ")", "{", "$", "this", "->", "writeln", "(", "'<info>Deleting current us...
Cleans current users and rights if asked. @param InputInterface $input @return UpdateUsersRightsCommand @throws \InvalidArgumentException
[ "Cleans", "current", "users", "and", "rights", "if", "asked", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/UpdateUsersRightsCommand.php#L426-L456
191,682
backbee/backbee-php
Console/Command/UpdateUsersRightsCommand.php
UpdateUsersRightsCommand.checksGroups
public function checksGroups(array $config) { $this->writeln('<info>Updating groups and their rights.</info>', OutputInterface::VERBOSITY_VERBOSE); foreach ($config as $identifier => $rights) { $group = $this->em->getRepository(Group::class)->findOneBy(['_name' => $identifier]); ...
php
public function checksGroups(array $config) { $this->writeln('<info>Updating groups and their rights.</info>', OutputInterface::VERBOSITY_VERBOSE); foreach ($config as $identifier => $rights) { $group = $this->em->getRepository(Group::class)->findOneBy(['_name' => $identifier]); ...
[ "public", "function", "checksGroups", "(", "array", "$", "config", ")", "{", "$", "this", "->", "writeln", "(", "'<info>Updating groups and their rights.</info>'", ",", "OutputInterface", "::", "VERBOSITY_VERBOSE", ")", ";", "foreach", "(", "$", "config", "as", "$...
Checks for groups, creates them if they don't exist. @param array $config @return UpdateUsersRightsCommand
[ "Checks", "for", "groups", "creates", "them", "if", "they", "don", "t", "exist", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/UpdateUsersRightsCommand.php#L465-L484
191,683
backbee/backbee-php
Console/Command/UpdateUsersRightsCommand.php
UpdateUsersRightsCommand.updateRights
private function updateRights(Group $group, array $config) { $securityIdentity = new UserSecurityIdentity($group->getObjectIdentifier(), Group::class); foreach ($config as $object => $rights) { $methodName = sprintf('add%sRights', ucfirst($object)); if (method_exists($this, ...
php
private function updateRights(Group $group, array $config) { $securityIdentity = new UserSecurityIdentity($group->getObjectIdentifier(), Group::class); foreach ($config as $object => $rights) { $methodName = sprintf('add%sRights', ucfirst($object)); if (method_exists($this, ...
[ "private", "function", "updateRights", "(", "Group", "$", "group", ",", "array", "$", "config", ")", "{", "$", "securityIdentity", "=", "new", "UserSecurityIdentity", "(", "$", "group", "->", "getObjectIdentifier", "(", ")", ",", "Group", "::", "class", ")",...
Updates rights associated to a group @param Group $group @param array $config
[ "Updates", "rights", "associated", "to", "a", "group" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/UpdateUsersRightsCommand.php#L492-L502
191,684
backbee/backbee-php
Console/Command/UpdateUsersRightsCommand.php
UpdateUsersRightsCommand.addObjectRights
private function addObjectRights($classname, array $config, UserSecurityIdentity $securityIdentity, $labelField = '_label') { $rights = $this->getActionsOnResources($config); foreach ((array) $rights as $resource => $actions) { if ('all' === $resource) { $this->addClassAc...
php
private function addObjectRights($classname, array $config, UserSecurityIdentity $securityIdentity, $labelField = '_label') { $rights = $this->getActionsOnResources($config); foreach ((array) $rights as $resource => $actions) { if ('all' === $resource) { $this->addClassAc...
[ "private", "function", "addObjectRights", "(", "$", "classname", ",", "array", "$", "config", ",", "UserSecurityIdentity", "$", "securityIdentity", ",", "$", "labelField", "=", "'_label'", ")", "{", "$", "rights", "=", "$", "this", "->", "getActionsOnResources",...
Adding rights on generic objects. @param string $classname @param array $config @param UserSecurityIdentity $securityIdentity @param string $labelField
[ "Adding", "rights", "on", "generic", "objects", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/UpdateUsersRightsCommand.php#L512-L535
191,685
backbee/backbee-php
Console/Command/UpdateUsersRightsCommand.php
UpdateUsersRightsCommand.addBundlesRights
private function addBundlesRights(array $config, UserSecurityIdentity $securityIdentity) { $rights = $this->getActionsOnResources($config); foreach ((array) $rights as $resource => $actions) { if ('all' === $resource) { foreach ($this->bbapp->getBundles() as $bundle) { ...
php
private function addBundlesRights(array $config, UserSecurityIdentity $securityIdentity) { $rights = $this->getActionsOnResources($config); foreach ((array) $rights as $resource => $actions) { if ('all' === $resource) { foreach ($this->bbapp->getBundles() as $bundle) { ...
[ "private", "function", "addBundlesRights", "(", "array", "$", "config", ",", "UserSecurityIdentity", "$", "securityIdentity", ")", "{", "$", "rights", "=", "$", "this", "->", "getActionsOnResources", "(", "$", "config", ")", ";", "foreach", "(", "(", "array", ...
Adding rights on AbstractBundle objects. @param array $config @param UserSecurityIdentity $securityIdentity
[ "Adding", "rights", "on", "AbstractBundle", "objects", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/UpdateUsersRightsCommand.php#L609-L629
191,686
backbee/backbee-php
Console/Command/UpdateUsersRightsCommand.php
UpdateUsersRightsCommand.addContentsRights
private function addContentsRights(array $config, UserSecurityIdentity $securityIdentity) { $rights = $this->getActionsOnResources($config); foreach ((array) $rights as $resource => $actions) { if ('all' === $resource) { $this->addClassAcl(AbstractClassContent::class, $se...
php
private function addContentsRights(array $config, UserSecurityIdentity $securityIdentity) { $rights = $this->getActionsOnResources($config); foreach ((array) $rights as $resource => $actions) { if ('all' === $resource) { $this->addClassAcl(AbstractClassContent::class, $se...
[ "private", "function", "addContentsRights", "(", "array", "$", "config", ",", "UserSecurityIdentity", "$", "securityIdentity", ")", "{", "$", "rights", "=", "$", "this", "->", "getActionsOnResources", "(", "$", "config", ")", ";", "foreach", "(", "(", "array",...
Adding rights on AbstractClassContent objects. @param array $config @param UserSecurityIdentity $securityIdentity
[ "Adding", "rights", "on", "AbstractClassContent", "objects", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/UpdateUsersRightsCommand.php#L637-L657
191,687
backbee/backbee-php
Console/Command/UpdateUsersRightsCommand.php
UpdateUsersRightsCommand.getActionsOnResources
private function getActionsOnResources($config) { $result = []; $resources = (array) Collection::get($config, 'resources', []); $actions = (array) Collection::get($config, 'actions', []); if (!isset($actions[0]) || !is_array($actions[0])) { $actions = [$actions]; ...
php
private function getActionsOnResources($config) { $result = []; $resources = (array) Collection::get($config, 'resources', []); $actions = (array) Collection::get($config, 'actions', []); if (!isset($actions[0]) || !is_array($actions[0])) { $actions = [$actions]; ...
[ "private", "function", "getActionsOnResources", "(", "$", "config", ")", "{", "$", "result", "=", "[", "]", ";", "$", "resources", "=", "(", "array", ")", "Collection", "::", "get", "(", "$", "config", ",", "'resources'", ",", "[", "]", ")", ";", "$"...
Format actions on resources. @param array $config @return array
[ "Format", "actions", "on", "resources", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/UpdateUsersRightsCommand.php#L666-L689
191,688
backbee/backbee-php
Console/Command/UpdateUsersRightsCommand.php
UpdateUsersRightsCommand.addClassAcl
private function addClassAcl($className, UserSecurityIdentity $securityIdentity, array $rights) { $objectIdentity = new ObjectIdentity('all', $className); $this->addAcl($objectIdentity, $securityIdentity, $rights); }
php
private function addClassAcl($className, UserSecurityIdentity $securityIdentity, array $rights) { $objectIdentity = new ObjectIdentity('all', $className); $this->addAcl($objectIdentity, $securityIdentity, $rights); }
[ "private", "function", "addClassAcl", "(", "$", "className", ",", "UserSecurityIdentity", "$", "securityIdentity", ",", "array", "$", "rights", ")", "{", "$", "objectIdentity", "=", "new", "ObjectIdentity", "(", "'all'", ",", "$", "className", ")", ";", "$", ...
Add rights to security group on whole instances of class. @param string $className @param UserSecurityIdentity $securityIdentity @param array $rights
[ "Add", "rights", "to", "security", "group", "on", "whole", "instances", "of", "class", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/UpdateUsersRightsCommand.php#L715-L719
191,689
backbee/backbee-php
Console/Command/UpdateUsersRightsCommand.php
UpdateUsersRightsCommand.addObjectAcl
private function addObjectAcl($object, UserSecurityIdentity $securityIdentity, array $rights) { $objectIdentity = ObjectIdentity::fromDomainObject($object); $this->addAcl($objectIdentity, $securityIdentity, $rights); }
php
private function addObjectAcl($object, UserSecurityIdentity $securityIdentity, array $rights) { $objectIdentity = ObjectIdentity::fromDomainObject($object); $this->addAcl($objectIdentity, $securityIdentity, $rights); }
[ "private", "function", "addObjectAcl", "(", "$", "object", ",", "UserSecurityIdentity", "$", "securityIdentity", ",", "array", "$", "rights", ")", "{", "$", "objectIdentity", "=", "ObjectIdentity", "::", "fromDomainObject", "(", "$", "object", ")", ";", "$", "...
Add rights to security group on one instance of object. @param object $object @param UserSecurityIdentity $securityIdentity @param array $rights
[ "Add", "rights", "to", "security", "group", "on", "one", "instance", "of", "object", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/UpdateUsersRightsCommand.php#L728-L732
191,690
backbee/backbee-php
Console/Command/UpdateUsersRightsCommand.php
UpdateUsersRightsCommand.addAcl
private function addAcl(ObjectIdentity $objectIdentity, UserSecurityIdentity $securityIdentity, array $rights) { // Getting ACL for this object identity try { $acl = $this->aclProvider->createAcl($objectIdentity); } catch (\Exception $e) { $acl = $this->aclProvider->f...
php
private function addAcl(ObjectIdentity $objectIdentity, UserSecurityIdentity $securityIdentity, array $rights) { // Getting ACL for this object identity try { $acl = $this->aclProvider->createAcl($objectIdentity); } catch (\Exception $e) { $acl = $this->aclProvider->f...
[ "private", "function", "addAcl", "(", "ObjectIdentity", "$", "objectIdentity", ",", "UserSecurityIdentity", "$", "securityIdentity", ",", "array", "$", "rights", ")", "{", "// Getting ACL for this object identity", "try", "{", "$", "acl", "=", "$", "this", "->", "...
Add rights to security group on object. @param ObjectIdentity $objectIdentity @param UserSecurityIdentity $securityIdentity @param array $rights
[ "Add", "rights", "to", "security", "group", "on", "object", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/UpdateUsersRightsCommand.php#L741-L771
191,691
backbee/backbee-php
Console/Command/UpdateUsersRightsCommand.php
UpdateUsersRightsCommand.write
protected function write($messages, $newLine = false, $verbosity = OutputInterface::VERBOSITY_NORMAL) { if ($verbosity <= $this->output->getVerbosity()) { $this->output->write($messages); if (true === $newLine) { $this->output->writeln(''); } } ...
php
protected function write($messages, $newLine = false, $verbosity = OutputInterface::VERBOSITY_NORMAL) { if ($verbosity <= $this->output->getVerbosity()) { $this->output->write($messages); if (true === $newLine) { $this->output->writeln(''); } } ...
[ "protected", "function", "write", "(", "$", "messages", ",", "$", "newLine", "=", "false", ",", "$", "verbosity", "=", "OutputInterface", "::", "VERBOSITY_NORMAL", ")", "{", "if", "(", "$", "verbosity", "<=", "$", "this", "->", "output", "->", "getVerbosit...
Writes a message to the output @param string|array $messages The message as an array of lines or a single string @param bool $newLine Whether to add a newline @param int $verbosity The verbosity of output (one of the VERBOSITY constants)
[ "Writes", "a", "message", "to", "the", "output" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/UpdateUsersRightsCommand.php#L791-L800
191,692
backbee/backbee-php
Util/Media.php
Media.getPathFromContent
public static function getPathFromContent(ElementFile $content, $folder_size = 3) { if (null === $content->getUid() || null === $content->originalname) { throw new InvalidArgumentException('Enable to compute path, the provided element file is not yet initialized'); } ...
php
public static function getPathFromContent(ElementFile $content, $folder_size = 3) { if (null === $content->getUid() || null === $content->originalname) { throw new InvalidArgumentException('Enable to compute path, the provided element file is not yet initialized'); } ...
[ "public", "static", "function", "getPathFromContent", "(", "ElementFile", "$", "content", ",", "$", "folder_size", "=", "3", ")", "{", "if", "(", "null", "===", "$", "content", "->", "getUid", "(", ")", "||", "null", "===", "$", "content", "->", "origina...
Returns the computed storage filename of an element file. @param \BackBee\ClassContent\Element\File $content @param int $folder_size Optional, size in characters of the storing folder @return string @throws \BackBee\Exception\InvalidArgumentException Occurs if the provided element file...
[ "Returns", "the", "computed", "storage", "filename", "of", "an", "element", "file", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Util/Media.php#L50-L71
191,693
backbee/backbee-php
Util/Media.php
Media.getPathFromUid
public static function getPathFromUid($uid, $originalname, $folder_size = 3, $include_originalname = false) { if (false === is_string($uid) || true === empty($uid)) { throw new InvalidArgumentException('Enable to compute path, the provided uid is not a valid string'); } $folder ...
php
public static function getPathFromUid($uid, $originalname, $folder_size = 3, $include_originalname = false) { if (false === is_string($uid) || true === empty($uid)) { throw new InvalidArgumentException('Enable to compute path, the provided uid is not a valid string'); } $folder ...
[ "public", "static", "function", "getPathFromUid", "(", "$", "uid", ",", "$", "originalname", ",", "$", "folder_size", "=", "3", ",", "$", "include_originalname", "=", "false", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "uid", ")", "||", ...
Returns the computed storage filename base on an uid. @param string $uid @param string $originalname @param int $folder_size @param boolean $include_originalname @return string @throws \BackBee\Exception\InvalidArgumentException Occurs if the provided $uid is invalid
[ "Returns", "the", "computed", "storage", "filename", "base", "on", "an", "uid", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Util/Media.php#L85-L106
191,694
backbee/backbee-php
Util/Media.php
Media.resize
public static function resize($source, $dest, $width, $height) { if (false === extension_loaded('gd')) { throw new \BackBee\Exception\BBException('gd extension is required'); } if (false === is_readable($source)) { throw new InvalidArgumentException('Enable to read s...
php
public static function resize($source, $dest, $width, $height) { if (false === extension_loaded('gd')) { throw new \BackBee\Exception\BBException('gd extension is required'); } if (false === is_readable($source)) { throw new InvalidArgumentException('Enable to read s...
[ "public", "static", "function", "resize", "(", "$", "source", ",", "$", "dest", ",", "$", "width", ",", "$", "height", ")", "{", "if", "(", "false", "===", "extension_loaded", "(", "'gd'", ")", ")", "{", "throw", "new", "\\", "BackBee", "\\", "Except...
Resizes an image and saves it to the provided file path. @param string $source The filepath of the source image @param string $dest The filepath of the target image @param int $width @param int $height @return boolean Returns TRUE on success, FALSE on failure @throws \BackBee\Exception\BBException Occures if...
[ "Resizes", "an", "image", "and", "saves", "it", "to", "the", "provided", "file", "path", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Util/Media.php#L121-L184
191,695
backbee/backbee-php
Console/Command/ApplicationUpdateCommand.php
ApplicationUpdateCommand.initConnection
protected function initConnection($input, $output) { if (null !== $input->getOption('host')) { $connection['host'] = $input->getOption('host'); } if (null !== $input->getOption('port')) { $connection['port'] = $input->getOption('port'); } if (null !...
php
protected function initConnection($input, $output) { if (null !== $input->getOption('host')) { $connection['host'] = $input->getOption('host'); } if (null !== $input->getOption('port')) { $connection['port'] = $input->getOption('port'); } if (null !...
[ "protected", "function", "initConnection", "(", "$", "input", ",", "$", "output", ")", "{", "if", "(", "null", "!==", "$", "input", "->", "getOption", "(", "'host'", ")", ")", "{", "$", "connection", "[", "'host'", "]", "=", "$", "input", "->", "getO...
Initiate doctrine connection for the Command on master database if its configure @param object $input The input option of command @param object $output The output of command @throws \DatabaseConnectionException When Unable to connect to database
[ "Initiate", "doctrine", "connection", "for", "the", "Command", "on", "master", "database", "if", "its", "configure" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/ApplicationUpdateCommand.php#L94-L152
191,696
backbee/backbee-php
Console/Command/ApplicationUpdateCommand.php
ApplicationUpdateCommand.checkBeforeUpdate
private function checkBeforeUpdate() { if (0 <= version_compare(BBApplication::VERSION, '1.1')) { $schemaManager = $this->em->getConnection()->getSchemaManager(); $pageName = $this->em->getClassMetadata('BackBee\NestedNode\Page')->getTableName(); $sectionName = $this->em-...
php
private function checkBeforeUpdate() { if (0 <= version_compare(BBApplication::VERSION, '1.1')) { $schemaManager = $this->em->getConnection()->getSchemaManager(); $pageName = $this->em->getClassMetadata('BackBee\NestedNode\Page')->getTableName(); $sectionName = $this->em-...
[ "private", "function", "checkBeforeUpdate", "(", ")", "{", "if", "(", "0", "<=", "version_compare", "(", "BBApplication", "::", "VERSION", ",", "'1.1'", ")", ")", "{", "$", "schemaManager", "=", "$", "this", "->", "em", "->", "getConnection", "(", ")", "...
Checks the db if section feature is already available for version > 1.1 @throws \BBException Raises if section features is not available
[ "Checks", "the", "db", "if", "section", "feature", "is", "already", "available", "for", "version", ">", "1", ".", "1" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/ApplicationUpdateCommand.php#L223-L234
191,697
backbee/backbee-php
Console/Command/ApplicationUpdateCommand.php
ApplicationUpdateCommand.getUpdateQueries
protected function getUpdateQueries() { $schema = new SchemaTool($this->em); $metadatas = $this->em->getMetadataFactory()->getAllMetadata(); // Insure the name of altered tables are quoted according to the platform $this->em->getEventManager()->addEventListener(Events::onSchemaAlte...
php
protected function getUpdateQueries() { $schema = new SchemaTool($this->em); $metadatas = $this->em->getMetadataFactory()->getAllMetadata(); // Insure the name of altered tables are quoted according to the platform $this->em->getEventManager()->addEventListener(Events::onSchemaAlte...
[ "protected", "function", "getUpdateQueries", "(", ")", "{", "$", "schema", "=", "new", "SchemaTool", "(", "$", "this", "->", "em", ")", ";", "$", "metadatas", "=", "$", "this", "->", "em", "->", "getMetadataFactory", "(", ")", "->", "getAllMetadata", "("...
Get update queries. @return string[]
[ "Get", "update", "queries", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Console/Command/ApplicationUpdateCommand.php#L241-L253
191,698
backbee/backbee-php
Exception/BBException.php
BBException.updateMessage
private function updateMessage() { $this->message = $this->_message; if (null !== $this->_source && null !== $this->_seek) { $this->message .= sprintf(' in %s at %d.', $this->_source, $this->_seek); } elseif (null !== $this->_source) { $this->message .= sprintf(' : %...
php
private function updateMessage() { $this->message = $this->_message; if (null !== $this->_source && null !== $this->_seek) { $this->message .= sprintf(' in %s at %d.', $this->_source, $this->_seek); } elseif (null !== $this->_source) { $this->message .= sprintf(' : %...
[ "private", "function", "updateMessage", "(", ")", "{", "$", "this", "->", "message", "=", "$", "this", "->", "_message", ";", "if", "(", "null", "!==", "$", "this", "->", "_source", "&&", "null", "!==", "$", "this", "->", "_seek", ")", "{", "$", "t...
Updates the error message according to the source and seek provided. @return \BackBee\Exception\BBException
[ "Updates", "the", "error", "message", "according", "to", "the", "source", "and", "seek", "provided", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Exception/BBException.php#L175-L186
191,699
backbee/backbee-php
Stream/ClassWrapper/Adapter/Yaml.php
Yaml._extractData
protected function _extractData($data) { $extractedData = array(); foreach ($data as $key => $value) { $type = 'scalar'; $options = array(); if (is_array($value)) { if (isset($value['type'])) { $type = $value['type']; ...
php
protected function _extractData($data) { $extractedData = array(); foreach ($data as $key => $value) { $type = 'scalar'; $options = array(); if (is_array($value)) { if (isset($value['type'])) { $type = $value['type']; ...
[ "protected", "function", "_extractData", "(", "$", "data", ")", "{", "$", "extractedData", "=", "array", "(", ")", ";", "foreach", "(", "$", "data", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "type", "=", "'scalar'", ";", "$", "options", ...
Extract and format data from parser. @param array $data @return array The extracted data
[ "Extract", "and", "format", "data", "from", "parser", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Stream/ClassWrapper/Adapter/Yaml.php#L101-L159