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
26,900
iherwig/wcmf
src/wcmf/lib/model/mapper/impl/NodeUnifiedRDBMapper.php
NodeUnifiedRDBMapper.addCriteria
protected function addCriteria(SelectStatement $selectStmt, $criteria, $tableName) { $parameters = []; if ($criteria != null) { foreach ($criteria as $criterion) { if ($criterion instanceof Criteria) { $placeholder = ':'.$tableName.'_'.$criterion->getAttribute(); list($criteria...
php
protected function addCriteria(SelectStatement $selectStmt, $criteria, $tableName) { $parameters = []; if ($criteria != null) { foreach ($criteria as $criterion) { if ($criterion instanceof Criteria) { $placeholder = ':'.$tableName.'_'.$criterion->getAttribute(); list($criteria...
[ "protected", "function", "addCriteria", "(", "SelectStatement", "$", "selectStmt", ",", "$", "criteria", ",", "$", "tableName", ")", "{", "$", "parameters", "=", "[", "]", ";", "if", "(", "$", "criteria", "!=", "null", ")", "{", "foreach", "(", "$", "c...
Add the given criteria to the select statement @param $selectStmt The select statement (instance of SelectStatement) @param $criteria An array of Criteria instances that define conditions on the object's attributes (maybe null) @param $tableName The table name @return Array of placeholder/value pairs
[ "Add", "the", "given", "criteria", "to", "the", "select", "statement" ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/model/mapper/impl/NodeUnifiedRDBMapper.php#L613-L638
26,901
iherwig/wcmf
src/wcmf/lib/model/mapper/impl/NodeUnifiedRDBMapper.php
NodeUnifiedRDBMapper.addOrderBy
protected function addOrderBy(SelectStatement $selectStmt, $orderby, $orderType, $aliasName, $defaultOrder) { if ($orderby == null) { $orderby = []; // use default ordering if ($defaultOrder && sizeof($defaultOrder) > 0) { foreach ($defaultOrder as $orderDef) { $orderby[] = $orde...
php
protected function addOrderBy(SelectStatement $selectStmt, $orderby, $orderType, $aliasName, $defaultOrder) { if ($orderby == null) { $orderby = []; // use default ordering if ($defaultOrder && sizeof($defaultOrder) > 0) { foreach ($defaultOrder as $orderDef) { $orderby[] = $orde...
[ "protected", "function", "addOrderBy", "(", "SelectStatement", "$", "selectStmt", ",", "$", "orderby", ",", "$", "orderType", ",", "$", "aliasName", ",", "$", "defaultOrder", ")", "{", "if", "(", "$", "orderby", "==", "null", ")", "{", "$", "orderby", "=...
Add the given order to the select statement @param $selectStmt The select statement (instance of SelectStatement) @param $orderby An array holding names of attributes to order by, maybe appended with 'ASC', 'DESC' (maybe null) @param $orderType The type that define the attributes in orderby (maybe null) @param $aliasNa...
[ "Add", "the", "given", "order", "to", "the", "select", "statement" ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/model/mapper/impl/NodeUnifiedRDBMapper.php#L648-L688
26,902
iherwig/wcmf
src/wcmf/lib/model/mapper/impl/NodeUnifiedRDBMapper.php
NodeUnifiedRDBMapper.convertValuesForStorage
protected function convertValuesForStorage($values) { // filter values according to type foreach($values as $valueName => $value) { $type = $this->getAttribute($valueName)->getType(); // integer if (strpos(strtolower($type), 'int') === 0) { $value = (strlen($value) == 0) ? null : intva...
php
protected function convertValuesForStorage($values) { // filter values according to type foreach($values as $valueName => $value) { $type = $this->getAttribute($valueName)->getType(); // integer if (strpos(strtolower($type), 'int') === 0) { $value = (strlen($value) == 0) ? null : intva...
[ "protected", "function", "convertValuesForStorage", "(", "$", "values", ")", "{", "// filter values according to type", "foreach", "(", "$", "values", "as", "$", "valueName", "=>", "$", "value", ")", "{", "$", "type", "=", "$", "this", "->", "getAttribute", "(...
Convert values before putting into storage @param $values Associative Array @return Associative Array
[ "Convert", "values", "before", "putting", "into", "storage" ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/model/mapper/impl/NodeUnifiedRDBMapper.php#L749-L764
26,903
iherwig/wcmf
src/wcmf/lib/model/mapper/impl/NodeUnifiedRDBMapper.php
NodeUnifiedRDBMapper.getSortableObject
protected function getSortableObject(PersistentObjectProxy $objectProxy, PersistentObjectProxy $relativeProxy, RelationDescription $relationDesc) { // in a many to many relation, we have to modify the order of the relation objects if ($relationDesc instanceof RDBManyToManyRelationDescription) { ...
php
protected function getSortableObject(PersistentObjectProxy $objectProxy, PersistentObjectProxy $relativeProxy, RelationDescription $relationDesc) { // in a many to many relation, we have to modify the order of the relation objects if ($relationDesc instanceof RDBManyToManyRelationDescription) { ...
[ "protected", "function", "getSortableObject", "(", "PersistentObjectProxy", "$", "objectProxy", ",", "PersistentObjectProxy", "$", "relativeProxy", ",", "RelationDescription", "$", "relationDesc", ")", "{", "// in a many to many relation, we have to modify the order of the relation...
Get the object which carries the sortkey in the relation of the given object and relative. @param PersistentObjectProxy $objectProxy @param PersistentObjectProxy $relativeProxy @param RelationDescription $relationDesc The relation description @return PersistentObjectProxy
[ "Get", "the", "object", "which", "carries", "the", "sortkey", "in", "the", "relation", "of", "the", "given", "object", "and", "relative", "." ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/model/mapper/impl/NodeUnifiedRDBMapper.php#L774-L782
26,904
iherwig/wcmf
src/wcmf/lib/model/mapper/impl/NodeUnifiedRDBMapper.php
NodeUnifiedRDBMapper.loadRelationObjects
protected function loadRelationObjects(PersistentObjectProxy $objectProxy, PersistentObjectProxy $relativeProxy, RDBManyToManyRelationDescription $relationDesc, $includeTransaction=false) { $nmMapper = self::getMapper($relationDesc->getThisEndRelation()->getOtherType()); $nmType = $nmMapper-...
php
protected function loadRelationObjects(PersistentObjectProxy $objectProxy, PersistentObjectProxy $relativeProxy, RDBManyToManyRelationDescription $relationDesc, $includeTransaction=false) { $nmMapper = self::getMapper($relationDesc->getThisEndRelation()->getOtherType()); $nmType = $nmMapper-...
[ "protected", "function", "loadRelationObjects", "(", "PersistentObjectProxy", "$", "objectProxy", ",", "PersistentObjectProxy", "$", "relativeProxy", ",", "RDBManyToManyRelationDescription", "$", "relationDesc", ",", "$", "includeTransaction", "=", "false", ")", "{", "$",...
Load the relation objects in a many to many relation from the database. @param $objectProxy The proxy at this end of the relation. @param $relativeProxy The proxy at the other end of the relation. @param $relationDesc The RDBManyToManyRelationDescription instance describing the relation. @param $includeTransaction Bool...
[ "Load", "the", "relation", "objects", "in", "a", "many", "to", "many", "relation", "from", "the", "database", "." ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/model/mapper/impl/NodeUnifiedRDBMapper.php#L792-L826
26,905
iherwig/wcmf
src/wcmf/lib/persistence/impl/DefaultPersistentObject.php
DefaultPersistentObject.initializeMapper
private function initializeMapper() { // set the mapper $persistenceFacade = ObjectFactory::getInstance('persistenceFacade'); if ($persistenceFacade->isKnownType($this->type)) { $this->mapper = $persistenceFacade->getMapper($this->type); } else { // initialize null mapper if not done alr...
php
private function initializeMapper() { // set the mapper $persistenceFacade = ObjectFactory::getInstance('persistenceFacade'); if ($persistenceFacade->isKnownType($this->type)) { $this->mapper = $persistenceFacade->getMapper($this->type); } else { // initialize null mapper if not done alr...
[ "private", "function", "initializeMapper", "(", ")", "{", "// set the mapper", "$", "persistenceFacade", "=", "ObjectFactory", "::", "getInstance", "(", "'persistenceFacade'", ")", ";", "if", "(", "$", "persistenceFacade", "->", "isKnownType", "(", "$", "this", "-...
Initialize the PersistenceMapper instance
[ "Initialize", "the", "PersistenceMapper", "instance" ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/persistence/impl/DefaultPersistentObject.php#L98-L111
26,906
iherwig/wcmf
src/wcmf/lib/persistence/impl/DefaultPersistentObject.php
DefaultPersistentObject.setOIDInternal
protected function setOIDInternal(ObjectId $oid, $triggerListeners) { $this->type = $oid->getType(); $this->oid = $oid; // update the primary key attributes $ids = $oid->getId(); $pkNames = $this->getMapper()->getPkNames(); for ($i=0, $count=sizeof($pkNames); $i<$count; $i++) { if ($trigge...
php
protected function setOIDInternal(ObjectId $oid, $triggerListeners) { $this->type = $oid->getType(); $this->oid = $oid; // update the primary key attributes $ids = $oid->getId(); $pkNames = $this->getMapper()->getPkNames(); for ($i=0, $count=sizeof($pkNames); $i<$count; $i++) { if ($trigge...
[ "protected", "function", "setOIDInternal", "(", "ObjectId", "$", "oid", ",", "$", "triggerListeners", ")", "{", "$", "this", "->", "type", "=", "$", "oid", "->", "getType", "(", ")", ";", "$", "this", "->", "oid", "=", "$", "oid", ";", "// update the p...
Set the object id of the PersistentObject. @param $oid The PersistentObject's oid. @param $triggerListeners Boolean, whether value CahngeListeners should be notified or not
[ "Set", "the", "object", "id", "of", "the", "PersistentObject", "." ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/persistence/impl/DefaultPersistentObject.php#L150-L164
26,907
iherwig/wcmf
src/wcmf/lib/persistence/impl/DefaultPersistentObject.php
DefaultPersistentObject.updateOID
private function updateOID() { $pkValues = []; // collect the values of the primary keys and compose the oid from them $pkNames = $this->getMapper()->getPkNames(); foreach ($pkNames as $pkName) { $pkValues[] = self::getValue($pkName); } $this->oid = new ObjectId($this->getType(), $pkValues...
php
private function updateOID() { $pkValues = []; // collect the values of the primary keys and compose the oid from them $pkNames = $this->getMapper()->getPkNames(); foreach ($pkNames as $pkName) { $pkValues[] = self::getValue($pkName); } $this->oid = new ObjectId($this->getType(), $pkValues...
[ "private", "function", "updateOID", "(", ")", "{", "$", "pkValues", "=", "[", "]", ";", "// collect the values of the primary keys and compose the oid from them", "$", "pkNames", "=", "$", "this", "->", "getMapper", "(", ")", "->", "getPkNames", "(", ")", ";", "...
Recalculate the object id
[ "Recalculate", "the", "object", "id" ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/persistence/impl/DefaultPersistentObject.php#L272-L280
26,908
iherwig/wcmf
src/wcmf/lib/persistence/impl/DefaultPersistentObject.php
DefaultPersistentObject.validateValueAgainstValidateType
protected function validateValueAgainstValidateType($name, $value) { // don't validate referenced values $mapper = $this->getMapper(); if ($mapper->hasAttribute($name) && $mapper->getAttribute($name) instanceof ReferenceDescription) { return; } $validateType = $this->getValueProperty($name, 'v...
php
protected function validateValueAgainstValidateType($name, $value) { // don't validate referenced values $mapper = $this->getMapper(); if ($mapper->hasAttribute($name) && $mapper->getAttribute($name) instanceof ReferenceDescription) { return; } $validateType = $this->getValueProperty($name, 'v...
[ "protected", "function", "validateValueAgainstValidateType", "(", "$", "name", ",", "$", "value", ")", "{", "// don't validate referenced values", "$", "mapper", "=", "$", "this", "->", "getMapper", "(", ")", ";", "if", "(", "$", "mapper", "->", "hasAttribute", ...
Check a value's value against the validation type set on it. This method uses the validateType property of the attribute definition. Throws a ValidationException if the value is not valid. @param $name The name of the item to set. @param $value The value of the item.
[ "Check", "a", "value", "s", "value", "against", "the", "validation", "type", "set", "on", "it", ".", "This", "method", "uses", "the", "validateType", "property", "of", "the", "attribute", "definition", ".", "Throws", "a", "ValidationException", "if", "the", ...
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/persistence/impl/DefaultPersistentObject.php#L424-L447
26,909
iherwig/wcmf
src/wcmf/lib/persistence/impl/DefaultPersistentObject.php
DefaultPersistentObject.dumpArray
private static function dumpArray(array $array) { $str = "["; foreach ($array as $value) { if (is_object($value)) { $str .= $value->__toString().", "; } else { $str .= $value.", "; } } $str = preg_replace("/, $/", "", $str)."]"; return $str; }
php
private static function dumpArray(array $array) { $str = "["; foreach ($array as $value) { if (is_object($value)) { $str .= $value->__toString().", "; } else { $str .= $value.", "; } } $str = preg_replace("/, $/", "", $str)."]"; return $str; }
[ "private", "static", "function", "dumpArray", "(", "array", "$", "array", ")", "{", "$", "str", "=", "\"[\"", ";", "foreach", "(", "$", "array", "as", "$", "value", ")", "{", "if", "(", "is_object", "(", "$", "value", ")", ")", "{", "$", "str", "...
Get a string representation of an array of values. @param $array The array to dump @return String
[ "Get", "a", "string", "representation", "of", "an", "array", "of", "values", "." ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/persistence/impl/DefaultPersistentObject.php#L610-L622
26,910
iherwig/wcmf
src/wcmf/lib/model/StringQuery.php
StringQuery.mapToDatabase
protected static function mapToDatabase($type, $valueName) { $mapper = self::getMapper($type); if ($mapper->hasAttribute($valueName)) { $attributeDescription = $mapper->getAttribute($valueName); } else { // if the attribute does not exist, it might be the column name already foreach ($...
php
protected static function mapToDatabase($type, $valueName) { $mapper = self::getMapper($type); if ($mapper->hasAttribute($valueName)) { $attributeDescription = $mapper->getAttribute($valueName); } else { // if the attribute does not exist, it might be the column name already foreach ($...
[ "protected", "static", "function", "mapToDatabase", "(", "$", "type", ",", "$", "valueName", ")", "{", "$", "mapper", "=", "self", "::", "getMapper", "(", "$", "type", ")", ";", "if", "(", "$", "mapper", "->", "hasAttribute", "(", "$", "valueName", ")"...
Map a application type and value name to the appropriate database names @param $type The type to map @param $valueName The name of the value to map @return An array with the table and column name or null if no mapper is found
[ "Map", "a", "application", "type", "and", "value", "name", "to", "the", "appropriate", "database", "names" ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/model/StringQuery.php#L272-L293
26,911
GW2Treasures/gw2api
src/V2/ApiHandler.php
ApiHandler.getResponseAsJson
protected function getResponseAsJson( ResponseInterface $response ) { if( $response->hasHeader('Content-Type') ) { $typeHeader = $response->getHeader('Content-Type'); $contentType = array_shift($typeHeader); if( stripos( $contentType, 'application/json' ) === 0 ) { ...
php
protected function getResponseAsJson( ResponseInterface $response ) { if( $response->hasHeader('Content-Type') ) { $typeHeader = $response->getHeader('Content-Type'); $contentType = array_shift($typeHeader); if( stripos( $contentType, 'application/json' ) === 0 ) { ...
[ "protected", "function", "getResponseAsJson", "(", "ResponseInterface", "$", "response", ")", "{", "if", "(", "$", "response", "->", "hasHeader", "(", "'Content-Type'", ")", ")", "{", "$", "typeHeader", "=", "$", "response", "->", "getHeader", "(", "'Content-T...
Returns the json object if the response contains valid json, otherwise null. @param ResponseInterface $response @return mixed|null
[ "Returns", "the", "json", "object", "if", "the", "response", "contains", "valid", "json", "otherwise", "null", "." ]
c8795af0c1d0a434b9e530f779d5a95786db2176
https://github.com/GW2Treasures/gw2api/blob/c8795af0c1d0a434b9e530f779d5a95786db2176/src/V2/ApiHandler.php#L32-L43
26,912
iherwig/wcmf
src/wcmf/application/controller/XMLExportController.php
XMLExportController.exportNodes
protected function exportNodes($oids) { // Export starts from root oids and iterates over all children. // On every call we have to decide what to do: // - If there is an iterator stored in the session we are inside a tree and continue iterating (_NODES_PER_CALL nodes) // until the iterator finishes ...
php
protected function exportNodes($oids) { // Export starts from root oids and iterates over all children. // On every call we have to decide what to do: // - If there is an iterator stored in the session we are inside a tree and continue iterating (_NODES_PER_CALL nodes) // until the iterator finishes ...
[ "protected", "function", "exportNodes", "(", "$", "oids", ")", "{", "// Export starts from root oids and iterates over all children.", "// On every call we have to decide what to do:", "// - If there is an iterator stored in the session we are inside a tree and continue iterating (_NODES_PER_CAL...
Serialize all Nodes with given object ids to XML @param $oids The object ids to process @note This is a callback method called on a matching work package, see BatchController::addWorkPackage()
[ "Serialize", "all", "Nodes", "with", "given", "object", "ids", "to", "XML" ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/application/controller/XMLExportController.php#L230-L295
26,913
iherwig/wcmf
src/wcmf/application/controller/XMLExportController.php
XMLExportController.writeNode
protected function writeNode($fileHandle, ObjectId $oid, $depth) { $persistenceFacade = $this->getPersistenceFacade(); // get document definition $docIndent = $this->getRequestValue('docIndent'); $docLinebreak = $this->getRequestValue('docLinebreak'); $cacheSection = $this->getRequestValue('cacheSe...
php
protected function writeNode($fileHandle, ObjectId $oid, $depth) { $persistenceFacade = $this->getPersistenceFacade(); // get document definition $docIndent = $this->getRequestValue('docIndent'); $docLinebreak = $this->getRequestValue('docLinebreak'); $cacheSection = $this->getRequestValue('cacheSe...
[ "protected", "function", "writeNode", "(", "$", "fileHandle", ",", "ObjectId", "$", "oid", ",", "$", "depth", ")", "{", "$", "persistenceFacade", "=", "$", "this", "->", "getPersistenceFacade", "(", ")", ";", "// get document definition", "$", "docIndent", "="...
Serialize a Node to XML @param $fileHandle The file handle to write to @param $oid The object id of the node @param $depth The depth of the node in the tree
[ "Serialize", "a", "Node", "to", "XML" ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/application/controller/XMLExportController.php#L356-L418
26,914
iherwig/wcmf
src/wcmf/application/controller/XMLExportController.php
XMLExportController.getNumUnvisitedChildren
protected function getNumUnvisitedChildren(Node $node) { $cacheSection = $this->getRequestValue('cacheSection'); $exportedOids = $this->cache->get($cacheSection, self::CACHE_KEY_EXPORTED_OIDS); $childOIDs = []; $mapper = $node->getMapper(); $relations = $mapper->getRelations('child'); foreach (...
php
protected function getNumUnvisitedChildren(Node $node) { $cacheSection = $this->getRequestValue('cacheSection'); $exportedOids = $this->cache->get($cacheSection, self::CACHE_KEY_EXPORTED_OIDS); $childOIDs = []; $mapper = $node->getMapper(); $relations = $mapper->getRelations('child'); foreach (...
[ "protected", "function", "getNumUnvisitedChildren", "(", "Node", "$", "node", ")", "{", "$", "cacheSection", "=", "$", "this", "->", "getRequestValue", "(", "'cacheSection'", ")", ";", "$", "exportedOids", "=", "$", "this", "->", "cache", "->", "get", "(", ...
Get number of children of the given node, that were not visited yet @param $node @return Integer
[ "Get", "number", "of", "children", "of", "the", "given", "node", "that", "were", "not", "visited", "yet" ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/application/controller/XMLExportController.php#L425-L450
26,915
iherwig/wcmf
src/wcmf/lib/presentation/format/impl/CacheTrait.php
CacheTrait.putInCache
protected function putInCache(Response $response, $payload) { $this->getCache()->put($this->getCacheSection($response), $response->getCacheId(), $payload, $response->getCacheLifetime()); }
php
protected function putInCache(Response $response, $payload) { $this->getCache()->put($this->getCacheSection($response), $response->getCacheId(), $payload, $response->getCacheLifetime()); }
[ "protected", "function", "putInCache", "(", "Response", "$", "response", ",", "$", "payload", ")", "{", "$", "this", "->", "getCache", "(", ")", "->", "put", "(", "$", "this", "->", "getCacheSection", "(", "$", "response", ")", ",", "$", "response", "-...
Store the payload of the response in the cache. @param $response @param $payload String
[ "Store", "the", "payload", "of", "the", "response", "in", "the", "cache", "." ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/presentation/format/impl/CacheTrait.php#L78-L80
26,916
iherwig/wcmf
src/wcmf/lib/presentation/format/impl/CacheTrait.php
CacheTrait.getFromCache
protected function getFromCache(Response $response) { return $this->getCache()->get($this->getCacheSection($response), $response->getCacheId()); }
php
protected function getFromCache(Response $response) { return $this->getCache()->get($this->getCacheSection($response), $response->getCacheId()); }
[ "protected", "function", "getFromCache", "(", "Response", "$", "response", ")", "{", "return", "$", "this", "->", "getCache", "(", ")", "->", "get", "(", "$", "this", "->", "getCacheSection", "(", "$", "response", ")", ",", "$", "response", "->", "getCac...
Load the payload of the response from the cache. @param $response @return String
[ "Load", "the", "payload", "of", "the", "response", "from", "the", "cache", "." ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/presentation/format/impl/CacheTrait.php#L87-L89
26,917
iherwig/wcmf
src/wcmf/lib/service/impl/RPCClient.php
RPCClient.setSessionId
protected function setSessionId($sessionId) { $session = ObjectFactory::getInstance('session'); $sids = $session->get(self::SIDS_SESSION_VARNAME); $sids[$this->serverCli] = $sessionId; $session->set(self::SIDS_SESSION_VARNAME, $sids); }
php
protected function setSessionId($sessionId) { $session = ObjectFactory::getInstance('session'); $sids = $session->get(self::SIDS_SESSION_VARNAME); $sids[$this->serverCli] = $sessionId; $session->set(self::SIDS_SESSION_VARNAME, $sids); }
[ "protected", "function", "setSessionId", "(", "$", "sessionId", ")", "{", "$", "session", "=", "ObjectFactory", "::", "getInstance", "(", "'session'", ")", ";", "$", "sids", "=", "$", "session", "->", "get", "(", "self", "::", "SIDS_SESSION_VARNAME", ")", ...
Store the session id for our server in the local session @return The session id or null
[ "Store", "the", "session", "id", "for", "our", "server", "in", "the", "local", "session" ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/service/impl/RPCClient.php#L164-L169
26,918
iherwig/wcmf
src/wcmf/lib/service/impl/RPCClient.php
RPCClient.getSessionId
protected function getSessionId() { // check if we already have a session with the server $session = ObjectFactory::getInstance('session'); $sids = $session->get(self::SIDS_SESSION_VARNAME); if (isset($sids[$this->serverCli])) { return $sids[$this->serverCli]; } return null; }
php
protected function getSessionId() { // check if we already have a session with the server $session = ObjectFactory::getInstance('session'); $sids = $session->get(self::SIDS_SESSION_VARNAME); if (isset($sids[$this->serverCli])) { return $sids[$this->serverCli]; } return null; }
[ "protected", "function", "getSessionId", "(", ")", "{", "// check if we already have a session with the server", "$", "session", "=", "ObjectFactory", "::", "getInstance", "(", "'session'", ")", ";", "$", "sids", "=", "$", "session", "->", "get", "(", "self", "::"...
Get the session id for our server from the local session @return The session id or null
[ "Get", "the", "session", "id", "for", "our", "server", "from", "the", "local", "session" ]
2542b8d4139464d39a9a8ce8a954dfecf700c41b
https://github.com/iherwig/wcmf/blob/2542b8d4139464d39a9a8ce8a954dfecf700c41b/src/wcmf/lib/service/impl/RPCClient.php#L175-L183
26,919
thelfensdrfer/yii2sshconsole
src/Controller.php
Controller.connect
public function connect($host, $auth, $port = 22, $timeout = 10) { $this->ssh = new SSH2($host, $port, $timeout); if (!isset($auth['key']) && isset($auth['username'])) { // Login via username/password $username = $auth['username']; $password = isset($auth['password']) ? $auth['password'] : ''; if (!...
php
public function connect($host, $auth, $port = 22, $timeout = 10) { $this->ssh = new SSH2($host, $port, $timeout); if (!isset($auth['key']) && isset($auth['username'])) { // Login via username/password $username = $auth['username']; $password = isset($auth['password']) ? $auth['password'] : ''; if (!...
[ "public", "function", "connect", "(", "$", "host", ",", "$", "auth", ",", "$", "port", "=", "22", ",", "$", "timeout", "=", "10", ")", "{", "$", "this", "->", "ssh", "=", "new", "SSH2", "(", "$", "host", ",", "$", "port", ",", "$", "timeout", ...
Connect to the ssh server. @param string $host @param array $auth Login via username/password [ 'username' => 'myname', 'password' => 'mypassword', // can be empty ] or via private key [ 'key' => '/path/to/private.key', 'password' => 'mykeypassword', // can be empty ] @param integer $port Default 22 @param integer $ti...
[ "Connect", "to", "the", "ssh", "server", "." ]
7699c4cd0cddacd07a2236ca10f06ec384b2aa54
https://github.com/thelfensdrfer/yii2sshconsole/blob/7699c4cd0cddacd07a2236ca10f06ec384b2aa54/src/Controller.php#L43-L97
26,920
thelfensdrfer/yii2sshconsole
src/Controller.php
Controller.readLine
public function readLine() { $output = $this->ssh->_get_channel_packet(SSH2::CHANNEL_EXEC); return $output === true ? null : $output; }
php
public function readLine() { $output = $this->ssh->_get_channel_packet(SSH2::CHANNEL_EXEC); return $output === true ? null : $output; }
[ "public", "function", "readLine", "(", ")", "{", "$", "output", "=", "$", "this", "->", "ssh", "->", "_get_channel_packet", "(", "SSH2", "::", "CHANNEL_EXEC", ")", ";", "return", "$", "output", "===", "true", "?", "null", ":", "$", "output", ";", "}" ]
Read the next line from the SSH session. @return string|null
[ "Read", "the", "next", "line", "from", "the", "SSH", "session", "." ]
7699c4cd0cddacd07a2236ca10f06ec384b2aa54
https://github.com/thelfensdrfer/yii2sshconsole/blob/7699c4cd0cddacd07a2236ca10f06ec384b2aa54/src/Controller.php#L104-L109
26,921
thelfensdrfer/yii2sshconsole
src/Controller.php
Controller.run
public function run($commands, $callback = null) { if (!$this->ssh->isConnected()) throw new NotConnectedException(); if (is_array($commands)) $commands = implode(' && ', $commands); if ($callback === null) $output = ''; $this->ssh->exec($commands, false); while (true) { if (is_null($line = $...
php
public function run($commands, $callback = null) { if (!$this->ssh->isConnected()) throw new NotConnectedException(); if (is_array($commands)) $commands = implode(' && ', $commands); if ($callback === null) $output = ''; $this->ssh->exec($commands, false); while (true) { if (is_null($line = $...
[ "public", "function", "run", "(", "$", "commands", ",", "$", "callback", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "ssh", "->", "isConnected", "(", ")", ")", "throw", "new", "NotConnectedException", "(", ")", ";", "if", "(", "is_array...
Run a ssh command for the current connection. @param string|array $commands @param callable $callback @throws NotConnectedException If the client is not connected to the server @return string|null
[ "Run", "a", "ssh", "command", "for", "the", "current", "connection", "." ]
7699c4cd0cddacd07a2236ca10f06ec384b2aa54
https://github.com/thelfensdrfer/yii2sshconsole/blob/7699c4cd0cddacd07a2236ca10f06ec384b2aa54/src/Controller.php#L121-L147
26,922
pr-of-it/t4
framework/Dbal/Query.php
Query.insert
public function insert($tables = null) { if (null !== $tables) { $this->tables($tables); } $this->action = 'insert'; return $this; }
php
public function insert($tables = null) { if (null !== $tables) { $this->tables($tables); } $this->action = 'insert'; return $this; }
[ "public", "function", "insert", "(", "$", "tables", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "tables", ")", "{", "$", "this", "->", "tables", "(", "$", "tables", ")", ";", "}", "$", "this", "->", "action", "=", "'insert'", ";", "retu...
Set all tables and set action to insert @param mixed $tables @return $this
[ "Set", "all", "tables", "and", "set", "action", "to", "insert" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/Query.php#L168-L175
26,923
pr-of-it/t4
framework/Dbal/Query.php
Query.update
public function update($tables = null) { if (null !== $tables) { $this->tables($tables); } $this->action = 'update'; return $this; }
php
public function update($tables = null) { if (null !== $tables) { $this->tables($tables); } $this->action = 'update'; return $this; }
[ "public", "function", "update", "(", "$", "tables", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "tables", ")", "{", "$", "this", "->", "tables", "(", "$", "tables", ")", ";", "}", "$", "this", "->", "action", "=", "'update'", ";", "retu...
Set all tables and set action to update @param mixed $tables @return $this
[ "Set", "all", "tables", "and", "set", "action", "to", "update" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/Query.php#L182-L189
26,924
pr-of-it/t4
framework/Dbal/Query.php
Query.delete
public function delete($tables = null) { if (null !== $tables) { $this->tables($tables); } $this->action = 'delete'; return $this; }
php
public function delete($tables = null) { if (null !== $tables) { $this->tables($tables); } $this->action = 'delete'; return $this; }
[ "public", "function", "delete", "(", "$", "tables", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "tables", ")", "{", "$", "this", "->", "tables", "(", "$", "tables", ")", ";", "}", "$", "this", "->", "action", "=", "'delete'", ";", "retu...
Set all tables and set action to delete @param mixed $tables @return $this
[ "Set", "all", "tables", "and", "set", "action", "to", "delete" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/Query.php#L196-L203
26,925
pr-of-it/t4
framework/Dbal/Query.php
Query.table
public function table($table = []) { $tables = $this->prepareNames(func_get_args()); $this->tables = array_merge($this->tables ?: [], $tables); return $this; }
php
public function table($table = []) { $tables = $this->prepareNames(func_get_args()); $this->tables = array_merge($this->tables ?: [], $tables); return $this; }
[ "public", "function", "table", "(", "$", "table", "=", "[", "]", ")", "{", "$", "tables", "=", "$", "this", "->", "prepareNames", "(", "func_get_args", "(", ")", ")", ";", "$", "this", "->", "tables", "=", "array_merge", "(", "$", "this", "->", "ta...
Add one table to query @param mixed $table @return $this
[ "Add", "one", "table", "to", "query" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/Query.php#L210-L215
26,926
pr-of-it/t4
framework/Dbal/Query.php
Query.column
public function column($column = '*') { if ('*' == $column) { $this->columns = ['*']; } else { $columns = $this->prepareNames(func_get_args()); $this->columns = array_merge( empty($this->columns) || ['*'] == $this->columns ? [] : $this->columns, ...
php
public function column($column = '*') { if ('*' == $column) { $this->columns = ['*']; } else { $columns = $this->prepareNames(func_get_args()); $this->columns = array_merge( empty($this->columns) || ['*'] == $this->columns ? [] : $this->columns, ...
[ "public", "function", "column", "(", "$", "column", "=", "'*'", ")", "{", "if", "(", "'*'", "==", "$", "column", ")", "{", "$", "this", "->", "columns", "=", "[", "'*'", "]", ";", "}", "else", "{", "$", "columns", "=", "$", "this", "->", "prepa...
Add one column name to query @param mixed $column @return $this
[ "Add", "one", "column", "name", "to", "query" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/Query.php#L234-L246
26,927
pr-of-it/t4
framework/Dbal/Query.php
Query.columns
public function columns($columns = '*') { if ('*' == $columns) { $this->columns = ['*']; } else { $columns = $this->prepareNames(func_get_args()); $this->columns = array_values(array_diff($columns, ['*'])); } return $this; }
php
public function columns($columns = '*') { if ('*' == $columns) { $this->columns = ['*']; } else { $columns = $this->prepareNames(func_get_args()); $this->columns = array_values(array_diff($columns, ['*'])); } return $this; }
[ "public", "function", "columns", "(", "$", "columns", "=", "'*'", ")", "{", "if", "(", "'*'", "==", "$", "columns", ")", "{", "$", "this", "->", "columns", "=", "[", "'*'", "]", ";", "}", "else", "{", "$", "columns", "=", "$", "this", "->", "pr...
Set all query's columns @param mixed $columns @return $this
[ "Set", "all", "query", "s", "columns" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/Query.php#L253-L262
26,928
pr-of-it/t4
framework/Dbal/Query.php
Query.join
public function join($table, $on, $type = 'full', $alias = '') { if (!isset($this->joins)) { $this->joins = []; } $join = [ 'table' => $this->trimName($table), 'on' => $on, 'type' => $type, ]; if (!empty($alias)) { $...
php
public function join($table, $on, $type = 'full', $alias = '') { if (!isset($this->joins)) { $this->joins = []; } $join = [ 'table' => $this->trimName($table), 'on' => $on, 'type' => $type, ]; if (!empty($alias)) { $...
[ "public", "function", "join", "(", "$", "table", ",", "$", "on", ",", "$", "type", "=", "'full'", ",", "$", "alias", "=", "''", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "joins", ")", ")", "{", "$", "this", "->", "joins", "="...
Add one join statement to query @param string $table @param string $on @param string $type @param string $alias @return $this
[ "Add", "one", "join", "statement", "to", "query" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/Query.php#L272-L287
26,929
pr-of-it/t4
framework/Dbal/Query.php
Query.joins
public function joins($joins) { $this->joins = []; foreach ($joins as $join) { $j = [ 'table' => $this->trimName($join['table']), 'on' => $join['on'], 'type' => $join['type'], ]; if (!empty($alias)) { ...
php
public function joins($joins) { $this->joins = []; foreach ($joins as $join) { $j = [ 'table' => $this->trimName($join['table']), 'on' => $join['on'], 'type' => $join['type'], ]; if (!empty($alias)) { ...
[ "public", "function", "joins", "(", "$", "joins", ")", "{", "$", "this", "->", "joins", "=", "[", "]", ";", "foreach", "(", "$", "joins", "as", "$", "join", ")", "{", "$", "j", "=", "[", "'table'", "=>", "$", "this", "->", "trimName", "(", "$",...
Set all query's joins @param array $joins @return $this
[ "Set", "all", "query", "s", "joins" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/Query.php#L294-L309
26,930
pr-of-it/t4
framework/Dbal/Query.php
Query.group
public function group($group) { $group = $this->prepareNames(func_get_args(), false); $this->group = $group; return $this; }
php
public function group($group) { $group = $this->prepareNames(func_get_args(), false); $this->group = $group; return $this; }
[ "public", "function", "group", "(", "$", "group", ")", "{", "$", "group", "=", "$", "this", "->", "prepareNames", "(", "func_get_args", "(", ")", ",", "false", ")", ";", "$", "this", "->", "group", "=", "$", "group", ";", "return", "$", "this", ";"...
Sets group values @param string $group @return $this
[ "Sets", "group", "values" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/Query.php#L327-L332
26,931
pr-of-it/t4
framework/Dbal/Query.php
Query.order
public function order($order) { $order = $this->prepareNames(func_get_args(),false); $this->order = $order; return $this; }
php
public function order($order) { $order = $this->prepareNames(func_get_args(),false); $this->order = $order; return $this; }
[ "public", "function", "order", "(", "$", "order", ")", "{", "$", "order", "=", "$", "this", "->", "prepareNames", "(", "func_get_args", "(", ")", ",", "false", ")", ";", "$", "this", "->", "order", "=", "$", "order", ";", "return", "$", "this", ";"...
Sets order directions @param string $order @return $this
[ "Sets", "order", "directions" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/Query.php#L350-L355
26,932
pr-of-it/t4
framework/Dbal/Query.php
Query.value
public function value($key, $value) { $this->values = array_merge($this->values ?? [], [$this->trimName($key) => $value]); return $this; }
php
public function value($key, $value) { $this->values = array_merge($this->values ?? [], [$this->trimName($key) => $value]); return $this; }
[ "public", "function", "value", "(", "$", "key", ",", "$", "value", ")", "{", "$", "this", "->", "values", "=", "array_merge", "(", "$", "this", "->", "values", "??", "[", "]", ",", "[", "$", "this", "->", "trimName", "(", "$", "key", ")", "=>", ...
Add one query's value for insert @param string $key @param mixed $value @return $this
[ "Add", "one", "query", "s", "value", "for", "insert" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/Query.php#L385-L389
26,933
pr-of-it/t4
framework/Dbal/Query.php
Query.values
public function values(array $values = []) { $values = array_combine(array_map([$this, 'trimName'], array_keys($values)), array_values($values)); $this->values = $values; return $this; }
php
public function values(array $values = []) { $values = array_combine(array_map([$this, 'trimName'], array_keys($values)), array_values($values)); $this->values = $values; return $this; }
[ "public", "function", "values", "(", "array", "$", "values", "=", "[", "]", ")", "{", "$", "values", "=", "array_combine", "(", "array_map", "(", "[", "$", "this", ",", "'trimName'", "]", ",", "array_keys", "(", "$", "values", ")", ")", ",", "array_v...
Sets all query's values for insert @param array $values @return $this
[ "Sets", "all", "query", "s", "values", "for", "insert" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/Query.php#L396-L401
26,934
pr-of-it/t4
framework/Dbal/Query.php
Query.param
public function param($key, $value) { $this->params = array_merge($this->params ?? [], [$key => $value]); return $this; }
php
public function param($key, $value) { $this->params = array_merge($this->params ?? [], [$key => $value]); return $this; }
[ "public", "function", "param", "(", "$", "key", ",", "$", "value", ")", "{", "$", "this", "->", "params", "=", "array_merge", "(", "$", "this", "->", "params", "??", "[", "]", ",", "[", "$", "key", "=>", "$", "value", "]", ")", ";", "return", "...
Sets one bind parameter @param string $key @param mixed $value @return $this
[ "Sets", "one", "bind", "parameter" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/Query.php#L409-L413
26,935
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/AccessControlConfig.php
CKFinder_Connector_Core_AccessControlConfig.addACLEntry
private function addACLEntry($role, $resourceType, $folderPath, $allowRulesMask, $denyRulesMask) { if (!strlen($folderPath)) { $folderPath = '/'; } else { if (substr($folderPath,0,1) != '/') { $folderPath = '/' . $folderPath; } ...
php
private function addACLEntry($role, $resourceType, $folderPath, $allowRulesMask, $denyRulesMask) { if (!strlen($folderPath)) { $folderPath = '/'; } else { if (substr($folderPath,0,1) != '/') { $folderPath = '/' . $folderPath; } ...
[ "private", "function", "addACLEntry", "(", "$", "role", ",", "$", "resourceType", ",", "$", "folderPath", ",", "$", "allowRulesMask", ",", "$", "denyRulesMask", ")", "{", "if", "(", "!", "strlen", "(", "$", "folderPath", ")", ")", "{", "$", "folderPath",...
Add ACL entry @param string $role role @param string $resourceType resource type @param string $folderPath folder path @param int $allowRulesMask allow rules mask @param int $denyRulesMask deny rules mask @access private
[ "Add", "ACL", "entry" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/AccessControlConfig.php#L102-L136
26,936
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/AccessControlConfig.php
CKFinder_Connector_Core_AccessControlConfig.getComputedMask
public function getComputedMask($resourceType, $folderPath) { $_computedMask = 0; $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config"); $_roleSessionVar = $_config->getRoleSessionVar(); $_userRole = null; if (strlen($_roleSessionVar) && isset($_SESSION[$_...
php
public function getComputedMask($resourceType, $folderPath) { $_computedMask = 0; $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config"); $_roleSessionVar = $_config->getRoleSessionVar(); $_userRole = null; if (strlen($_roleSessionVar) && isset($_SESSION[$_...
[ "public", "function", "getComputedMask", "(", "$", "resourceType", ",", "$", "folderPath", ")", "{", "$", "_computedMask", "=", "0", ";", "$", "_config", "=", "&", "CKFinder_Connector_Core_Factory", "::", "getInstance", "(", "\"Core_Config\"", ")", ";", "$", "...
Get computed mask @param string $resourceType @param string $folderPath @return int
[ "Get", "computed", "mask" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/AccessControlConfig.php#L146-L184
26,937
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/AccessControlConfig.php
CKFinder_Connector_Core_AccessControlConfig.mergePathComputedMask
private function mergePathComputedMask( $currentMask, $resourceType, $userRole, $path ) { $_folderEntries = $this->_aclEntries[$path]; $_possibleEntries = array(); $_possibleEntries[0] = "*#@#*"; $_possibleEntries[1] = "*#@#" . $resourceType; if (!is_null($userRole)) ...
php
private function mergePathComputedMask( $currentMask, $resourceType, $userRole, $path ) { $_folderEntries = $this->_aclEntries[$path]; $_possibleEntries = array(); $_possibleEntries[0] = "*#@#*"; $_possibleEntries[1] = "*#@#" . $resourceType; if (!is_null($userRole)) ...
[ "private", "function", "mergePathComputedMask", "(", "$", "currentMask", ",", "$", "resourceType", ",", "$", "userRole", ",", "$", "path", ")", "{", "$", "_folderEntries", "=", "$", "this", "->", "_aclEntries", "[", "$", "path", "]", ";", "$", "_possibleEn...
merge current mask with folder entries @access private @param int $currentMask @param string $resourceType @param string $userRole @param string $path @return int
[ "merge", "current", "mask", "with", "folder", "entries" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/AccessControlConfig.php#L196-L224
26,938
aimeos/ai-controller-jobs
controller/common/src/Controller/Common/Product/Import/Xml/Processor/Catalog/Standard.php
Standard.getCatalogItems
protected function getCatalogItems( \DOMNode $node ) { foreach( $node->childNodes as $node ) { if( $node->nodeName === 'catalogitem' && ( $refAttr = $node->attributes->getNamedItem( 'ref' ) ) !== null ) { $codes[] = $refAttr->nodeValue; } } $items = []; if( !empty( $codes ) ) { $manag...
php
protected function getCatalogItems( \DOMNode $node ) { foreach( $node->childNodes as $node ) { if( $node->nodeName === 'catalogitem' && ( $refAttr = $node->attributes->getNamedItem( 'ref' ) ) !== null ) { $codes[] = $refAttr->nodeValue; } } $items = []; if( !empty( $codes ) ) { $manag...
[ "protected", "function", "getCatalogItems", "(", "\\", "DOMNode", "$", "node", ")", "{", "foreach", "(", "$", "node", "->", "childNodes", "as", "$", "node", ")", "{", "if", "(", "$", "node", "->", "nodeName", "===", "'catalogitem'", "&&", "(", "$", "re...
Returns the catalog items referenced in the DOM node @param \DOMNode $node XML document node containing a list of nodes to process @return \Aimeos\MShop\Catalog\Item\Iface[] List of referenced catalog items
[ "Returns", "the", "catalog", "items", "referenced", "in", "the", "DOM", "node" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/common/src/Controller/Common/Product/Import/Xml/Processor/Catalog/Standard.php#L127-L153
26,939
aimeos/ai-controller-jobs
controller/common/src/Controller/Common/Product/Import/Csv/Processor/Catalog/Standard.php
Standard.addListItemDefaults
protected function addListItemDefaults( array $list, $pos ) { if( !isset( $list['catalog.lists.position'] ) ) { $list['catalog.lists.position'] = $pos; } if( !isset( $list['catalog.lists.status'] ) ) { $list['catalog.lists.status'] = 1; } return $list; }
php
protected function addListItemDefaults( array $list, $pos ) { if( !isset( $list['catalog.lists.position'] ) ) { $list['catalog.lists.position'] = $pos; } if( !isset( $list['catalog.lists.status'] ) ) { $list['catalog.lists.status'] = 1; } return $list; }
[ "protected", "function", "addListItemDefaults", "(", "array", "$", "list", ",", "$", "pos", ")", "{", "if", "(", "!", "isset", "(", "$", "list", "[", "'catalog.lists.position'", "]", ")", ")", "{", "$", "list", "[", "'catalog.lists.position'", "]", "=", ...
Adds the list item default values and returns the resulting array @param array $list Associative list of domain item keys and their values, e.g. "catalog.lists.status" => 1 @param integer $pos Computed position of the list item in the associated list of items @return array Given associative list enriched by default va...
[ "Adds", "the", "list", "item", "default", "values", "and", "returns", "the", "resulting", "array" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/common/src/Controller/Common/Product/Import/Csv/Processor/Catalog/Standard.php#L200-L211
26,940
aimeos/ai-controller-jobs
controller/common/src/Controller/Common/Product/Import/Csv/Processor/Catalog/Standard.php
Standard.getListItems
protected function getListItems( $prodid, array $types ) { if( empty( $types ) ) { return []; } $manager = \Aimeos\MShop::create( $this->getContext(), 'catalog/lists' ); $search = $manager->createSearch()->setSlice( 0, 0x7FFFFFFF ); $expr = []; foreach( $types as $type ) { $expr[] = $search->compar...
php
protected function getListItems( $prodid, array $types ) { if( empty( $types ) ) { return []; } $manager = \Aimeos\MShop::create( $this->getContext(), 'catalog/lists' ); $search = $manager->createSearch()->setSlice( 0, 0x7FFFFFFF ); $expr = []; foreach( $types as $type ) { $expr[] = $search->compar...
[ "protected", "function", "getListItems", "(", "$", "prodid", ",", "array", "$", "types", ")", "{", "if", "(", "empty", "(", "$", "types", ")", ")", "{", "return", "[", "]", ";", "}", "$", "manager", "=", "\\", "Aimeos", "\\", "MShop", "::", "create...
Returns the catalog list items for the given category and product ID @param string $prodid Unique product ID @param array $types List of catalog list types @return array List of catalog list items
[ "Returns", "the", "catalog", "list", "items", "for", "the", "given", "category", "and", "product", "ID" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/common/src/Controller/Common/Product/Import/Csv/Processor/Catalog/Standard.php#L243-L258
26,941
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/ErrorHandler/Base.php
CKFinder_Connector_ErrorHandler_Base.throwError
public function throwError($number, $text = false) { if ($this->_catchAllErrors || in_array($number, $this->_skipErrorsArray)) { return false; } $_xml =& CKFinder_Connector_Core_Factory::getInstance("Core_Xml"); $_xml->raiseError($number,$text); exit; }
php
public function throwError($number, $text = false) { if ($this->_catchAllErrors || in_array($number, $this->_skipErrorsArray)) { return false; } $_xml =& CKFinder_Connector_Core_Factory::getInstance("Core_Xml"); $_xml->raiseError($number,$text); exit; }
[ "public", "function", "throwError", "(", "$", "number", ",", "$", "text", "=", "false", ")", "{", "if", "(", "$", "this", "->", "_catchAllErrors", "||", "in_array", "(", "$", "number", ",", "$", "this", "->", "_skipErrorsArray", ")", ")", "{", "return"...
Throw connector error, return true if error has been thrown, false if error has been catched @param int $number @param string $text @access public
[ "Throw", "connector", "error", "return", "true", "if", "error", "has", "been", "thrown", "false", "if", "error", "has", "been", "catched" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/ErrorHandler/Base.php#L75-L85
26,942
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/FolderHandler.php
CKFinder_Connector_Core_FolderHandler.&
public function &getResourceTypeConfig() { if (!isset($this->_resourceTypeConfig)) { $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config"); $this->_resourceTypeConfig = $_config->getResourceTypeConfig($this->_resourceTypeName); } if (is_null($this->...
php
public function &getResourceTypeConfig() { if (!isset($this->_resourceTypeConfig)) { $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config"); $this->_resourceTypeConfig = $_config->getResourceTypeConfig($this->_resourceTypeName); } if (is_null($this->...
[ "public", "function", "&", "getResourceTypeConfig", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "_resourceTypeConfig", ")", ")", "{", "$", "_config", "=", "&", "CKFinder_Connector_Core_Factory", "::", "getInstance", "(", "\"Core_Config\"", ...
Get resource type config @return CKFinder_Connector_Core_ResourceTypeConfig @access public
[ "Get", "resource", "type", "config" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/FolderHandler.php#L128-L142
26,943
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/FolderHandler.php
CKFinder_Connector_Core_FolderHandler.getServerPath
public function getServerPath() { if (is_null($this->_serverPath)) { $this->_resourceTypeConfig = $this->getResourceTypeConfig(); $this->_serverPath = CKFinder_Connector_Utils_FileSystem::combinePaths($this->_resourceTypeConfig->getDirectory(), ltrim($this->_clientPath, "/")); ...
php
public function getServerPath() { if (is_null($this->_serverPath)) { $this->_resourceTypeConfig = $this->getResourceTypeConfig(); $this->_serverPath = CKFinder_Connector_Utils_FileSystem::combinePaths($this->_resourceTypeConfig->getDirectory(), ltrim($this->_clientPath, "/")); ...
[ "public", "function", "getServerPath", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "_serverPath", ")", ")", "{", "$", "this", "->", "_resourceTypeConfig", "=", "$", "this", "->", "getResourceTypeConfig", "(", ")", ";", "$", "this", "->",...
Get server path @return string @access public
[ "Get", "server", "path" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/FolderHandler.php#L196-L204
26,944
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/FolderHandler.php
CKFinder_Connector_Core_FolderHandler.getThumbsServerPath
public function getThumbsServerPath() { if (is_null($this->_thumbsServerPath)) { $this->_resourceTypeConfig = $this->getResourceTypeConfig(); $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config"); $_thumbnailsConfig = $_config->getThumbnailsConfig(); ...
php
public function getThumbsServerPath() { if (is_null($this->_thumbsServerPath)) { $this->_resourceTypeConfig = $this->getResourceTypeConfig(); $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config"); $_thumbnailsConfig = $_config->getThumbnailsConfig(); ...
[ "public", "function", "getThumbsServerPath", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "_thumbsServerPath", ")", ")", "{", "$", "this", "->", "_resourceTypeConfig", "=", "$", "this", "->", "getResourceTypeConfig", "(", ")", ";", "$", "_c...
Get server path to thumbnails directory @access public @return string
[ "Get", "server", "path", "to", "thumbnails", "directory" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/FolderHandler.php#L212-L237
26,945
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/FolderHandler.php
CKFinder_Connector_Core_FolderHandler.getAclMask
public function getAclMask() { $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config"); $_aclConfig = $_config->getAccessControlConfig(); if ($this->_aclMask == -1) { $this->_aclMask = $_aclConfig->getComputedMask($this->_resourceTypeName, $this->_clientPath); ...
php
public function getAclMask() { $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config"); $_aclConfig = $_config->getAccessControlConfig(); if ($this->_aclMask == -1) { $this->_aclMask = $_aclConfig->getComputedMask($this->_resourceTypeName, $this->_clientPath); ...
[ "public", "function", "getAclMask", "(", ")", "{", "$", "_config", "=", "&", "CKFinder_Connector_Core_Factory", "::", "getInstance", "(", "\"Core_Config\"", ")", ";", "$", "_aclConfig", "=", "$", "_config", "->", "getAccessControlConfig", "(", ")", ";", "if", ...
Get ACL Mask @return int @access public
[ "Get", "ACL", "Mask" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/FolderHandler.php#L245-L255
26,946
aimeos/ai-controller-jobs
controller/common/src/Controller/Common/Common/Import/Xml/Processor/Lists/Product/Standard.php
Standard.getItems
protected function getItems( \DomNodeList $nodes ) { $codes = $map = []; $manager = \Aimeos\MShop::create( $this->getContext(), 'product' ); foreach( $nodes as $node ) { if( $node->nodeName === 'productitem' && ( $attr = $node->attributes->getNamedItem( 'ref' ) ) !== null ) { $codes[$attr->nodeValue] =...
php
protected function getItems( \DomNodeList $nodes ) { $codes = $map = []; $manager = \Aimeos\MShop::create( $this->getContext(), 'product' ); foreach( $nodes as $node ) { if( $node->nodeName === 'productitem' && ( $attr = $node->attributes->getNamedItem( 'ref' ) ) !== null ) { $codes[$attr->nodeValue] =...
[ "protected", "function", "getItems", "(", "\\", "DomNodeList", "$", "nodes", ")", "{", "$", "codes", "=", "$", "map", "=", "[", "]", ";", "$", "manager", "=", "\\", "Aimeos", "\\", "MShop", "::", "create", "(", "$", "this", "->", "getContext", "(", ...
Returns the product items for the given nodes @param \DomNodeList $nodes List of XML product item nodes @return \Aimeos\MShop\Product\Item\Iface[] Associative list of product items with codes as keys
[ "Returns", "the", "product", "items", "for", "the", "given", "nodes" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/common/src/Controller/Common/Common/Import/Xml/Processor/Lists/Product/Standard.php#L100-L120
26,947
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/CommandHandler/CommandHandlerBase.php
CKFinder_Connector_CommandHandler_CommandHandlerBase.getFolderHandler
public function getFolderHandler() { if (is_null($this->_currentFolder)) { $this->_currentFolder =& CKFinder_Connector_Core_Factory::getInstance("Core_FolderHandler"); } return $this->_currentFolder; }
php
public function getFolderHandler() { if (is_null($this->_currentFolder)) { $this->_currentFolder =& CKFinder_Connector_Core_Factory::getInstance("Core_FolderHandler"); } return $this->_currentFolder; }
[ "public", "function", "getFolderHandler", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "_currentFolder", ")", ")", "{", "$", "this", "->", "_currentFolder", "=", "&", "CKFinder_Connector_Core_Factory", "::", "getInstance", "(", "\"Core_FolderHand...
Get Folder Handler @access public @return CKFinder_Connector_Core_FolderHandler
[ "Get", "Folder", "Handler" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/CommandHandler/CommandHandlerBase.php#L67-L74
26,948
aimeos/ai-controller-jobs
controller/common/src/Controller/Common/Common/Import/Xml/Traits.php
Traits.getProcessor
protected function getProcessor( $type, $domain ) { if( !isset( $this->processors[$domain][$type] ) ) { $this->processors[$domain][$type] = $this->createProcessor( $type, $domain ); } return $this->processors[$domain][$type]; }
php
protected function getProcessor( $type, $domain ) { if( !isset( $this->processors[$domain][$type] ) ) { $this->processors[$domain][$type] = $this->createProcessor( $type, $domain ); } return $this->processors[$domain][$type]; }
[ "protected", "function", "getProcessor", "(", "$", "type", ",", "$", "domain", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "processors", "[", "$", "domain", "]", "[", "$", "type", "]", ")", ")", "{", "$", "this", "->", "processors", ...
Returns the processor object for adding the product related information @param string $type Type of the processor @param string $domain Name of the domain that is imported @return \Aimeos\Controller\Common\Common\Import\Xml\Processor\Iface Processor object
[ "Returns", "the", "processor", "object", "for", "adding", "the", "product", "related", "information" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/common/src/Controller/Common/Common/Import/Xml/Traits.php#L40-L47
26,949
aimeos/ai-controller-jobs
controller/common/src/Controller/Common/Common/Import/Xml/Traits.php
Traits.createProcessor
protected function createProcessor( $type, $domain ) { $context = $this->getContext(); $config = $context->getConfig(); $parts = explode( '/', $type ); foreach( $parts as $part ) { if( ctype_alnum( $part ) === false ) { $msg = sprintf( 'Invalid characters in processor type "%1$s"', $type ); th...
php
protected function createProcessor( $type, $domain ) { $context = $this->getContext(); $config = $context->getConfig(); $parts = explode( '/', $type ); foreach( $parts as $part ) { if( ctype_alnum( $part ) === false ) { $msg = sprintf( 'Invalid characters in processor type "%1$s"', $type ); th...
[ "protected", "function", "createProcessor", "(", "$", "type", ",", "$", "domain", ")", "{", "$", "context", "=", "$", "this", "->", "getContext", "(", ")", ";", "$", "config", "=", "$", "context", "->", "getConfig", "(", ")", ";", "$", "parts", "=", ...
Creates a new processor object of the given type @param string $type Type of the processor @param string $domain Name of the domain that is imported @return \Aimeos\Controller\Common\Common\Import\Xml\Processor\Iface Processor object @throws \Aimeos\Controller\Common\Exception If type is invalid or processor isn't fou...
[ "Creates", "a", "new", "processor", "object", "of", "the", "given", "type" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/common/src/Controller/Common/Common/Import/Xml/Traits.php#L58-L101
26,950
pr-of-it/t4
framework/Fs/Helpers.php
Helpers.mkDir
public static function mkDir($dirName, $mode = 0777) { if (file_exists($dirName) && is_dir($dirName)) { return @chmod($dirName, $mode); } $result = @mkdir($dirName, $mode, true); if (false === $result) { throw new Exception('Can not create dir ' . $dirName); ...
php
public static function mkDir($dirName, $mode = 0777) { if (file_exists($dirName) && is_dir($dirName)) { return @chmod($dirName, $mode); } $result = @mkdir($dirName, $mode, true); if (false === $result) { throw new Exception('Can not create dir ' . $dirName); ...
[ "public", "static", "function", "mkDir", "(", "$", "dirName", ",", "$", "mode", "=", "0777", ")", "{", "if", "(", "file_exists", "(", "$", "dirName", ")", "&&", "is_dir", "(", "$", "dirName", ")", ")", "{", "return", "@", "chmod", "(", "$", "dirNam...
Creates directory by absolute path @param string $dirName Directory path @param int $mode Access mode @return bool @throws \T4\Fs\Exception
[ "Creates", "directory", "by", "absolute", "path" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Fs/Helpers.php#L74-L84
26,951
pr-of-it/t4
framework/Fs/Helpers.php
Helpers.dirMTime
public static function dirMTime($path) { clearstatcache(); return max( array_map( function ($f) { return filemtime($f); }, self::listDirRecursive($path) ), filemtime($path) ); }
php
public static function dirMTime($path) { clearstatcache(); return max( array_map( function ($f) { return filemtime($f); }, self::listDirRecursive($path) ), filemtime($path) ); }
[ "public", "static", "function", "dirMTime", "(", "$", "path", ")", "{", "clearstatcache", "(", ")", ";", "return", "max", "(", "array_map", "(", "function", "(", "$", "f", ")", "{", "return", "filemtime", "(", "$", "f", ")", ";", "}", ",", "self", ...
Max filemtime at path recursive @param string $path @return int
[ "Max", "filemtime", "at", "path", "recursive" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Fs/Helpers.php#L186-L198
26,952
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Hooks.php
CKFinder_Connector_Core_Hooks._printCallback
public static function _printCallback($callback) { if (is_array($callback)) { if (is_object($callback[0])) { $className = get_class($callback[0]); } else { $className = strval($callback[0]); } $functionName = $className . '::' ....
php
public static function _printCallback($callback) { if (is_array($callback)) { if (is_object($callback[0])) { $className = get_class($callback[0]); } else { $className = strval($callback[0]); } $functionName = $className . '::' ....
[ "public", "static", "function", "_printCallback", "(", "$", "callback", ")", "{", "if", "(", "is_array", "(", "$", "callback", ")", ")", "{", "if", "(", "is_object", "(", "$", "callback", "[", "0", "]", ")", ")", "{", "$", "className", "=", "get_clas...
Print user friendly name of a callback @param mixed $callback @return string
[ "Print", "user", "friendly", "name", "of", "a", "callback" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Hooks.php#L158-L172
26,953
aimeos/ai-controller-jobs
controller/common/src/Controller/Common/Product/Import/Csv/Processor/Base.php
Base.getObject
protected function getObject() { if( $this->object === null ) { throw new \Aimeos\Controller\Jobs\Exception( 'No processor object available' ); } return $this->object; }
php
protected function getObject() { if( $this->object === null ) { throw new \Aimeos\Controller\Jobs\Exception( 'No processor object available' ); } return $this->object; }
[ "protected", "function", "getObject", "(", ")", "{", "if", "(", "$", "this", "->", "object", "===", "null", ")", "{", "throw", "new", "\\", "Aimeos", "\\", "Controller", "\\", "Jobs", "\\", "Exception", "(", "'No processor object available'", ")", ";", "}"...
Returns the decorated processor object @return \Aimeos\Controller\Common\Product\Import\Csv\Processor\Iface Processor object @throws \Aimeos\Controller\Jobs\Exception If no processor object is available
[ "Returns", "the", "decorated", "processor", "object" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/common/src/Controller/Common/Product/Import/Csv/Processor/Base.php#L93-L100
26,954
pr-of-it/t4
framework/Dbal/QueryBuilder.php
QueryBuilder.with
public function with(string $modelClass, string $relationPath) { $relationNames = explode('.', $relationPath); foreach ($relationNames as $index => $relationName) { $relation = $modelClass::getRelation($relationName); if (empty($relation)) { throw new \BadMeth...
php
public function with(string $modelClass, string $relationPath) { $relationNames = explode('.', $relationPath); foreach ($relationNames as $index => $relationName) { $relation = $modelClass::getRelation($relationName); if (empty($relation)) { throw new \BadMeth...
[ "public", "function", "with", "(", "string", "$", "modelClass", ",", "string", "$", "relationPath", ")", "{", "$", "relationNames", "=", "explode", "(", "'.'", ",", "$", "relationPath", ")", ";", "foreach", "(", "$", "relationNames", "as", "$", "index", ...
Joins data from BelongsTo model relation @param string|\T4\Orm\Model $modelClass @param string $relationPath point-splitted relation chain @return self @throws \BadMethodCallException @throws \InvalidArgumentException
[ "Joins", "data", "from", "BelongsTo", "model", "relation" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Dbal/QueryBuilder.php#L170-L202
26,955
aimeos/ai-controller-jobs
controller/common/src/Controller/Common/Subscription/Process/Processor/Base.php
Base.renew
public function renew( \Aimeos\MShop\Subscription\Item\Iface $subscription, \Aimeos\MShop\Order\Item\Iface $order ) { }
php
public function renew( \Aimeos\MShop\Subscription\Item\Iface $subscription, \Aimeos\MShop\Order\Item\Iface $order ) { }
[ "public", "function", "renew", "(", "\\", "Aimeos", "\\", "MShop", "\\", "Subscription", "\\", "Item", "\\", "Iface", "$", "subscription", ",", "\\", "Aimeos", "\\", "MShop", "\\", "Order", "\\", "Item", "\\", "Iface", "$", "order", ")", "{", "}" ]
Processes the subscription renewal @param \Aimeos\MShop\Subscription\Item\Iface $subscription Subscription item @param \Aimeos\MShop\Order\Item\Iface $order Order invoice item
[ "Processes", "the", "subscription", "renewal" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/common/src/Controller/Common/Subscription/Process/Processor/Base.php#L63-L65
26,956
aimeos/ai-controller-jobs
controller/common/src/Controller/Common/Product/Import/Csv/Processor/Property/Standard.php
Standard.process
public function process( \Aimeos\MShop\Product\Item\Iface $product, array $data ) { $manager = \Aimeos\MShop::create( $this->getContext(), 'product/property' ); $propMap = []; $items = $product->getPropertyItems( null, false ); $map = $this->getMappedChunk( $data, $this->getMapping() ); foreach( $items as ...
php
public function process( \Aimeos\MShop\Product\Item\Iface $product, array $data ) { $manager = \Aimeos\MShop::create( $this->getContext(), 'product/property' ); $propMap = []; $items = $product->getPropertyItems( null, false ); $map = $this->getMappedChunk( $data, $this->getMapping() ); foreach( $items as ...
[ "public", "function", "process", "(", "\\", "Aimeos", "\\", "MShop", "\\", "Product", "\\", "Item", "\\", "Iface", "$", "product", ",", "array", "$", "data", ")", "{", "$", "manager", "=", "\\", "Aimeos", "\\", "MShop", "::", "create", "(", "$", "thi...
Saves the product property related data to the storage @param \Aimeos\MShop\Product\Item\Iface $product Product item with associated items @param array $data List of CSV fields with position as key and data as value @return array List of data which hasn't been imported
[ "Saves", "the", "product", "property", "related", "data", "to", "the", "storage" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/common/src/Controller/Common/Product/Import/Csv/Processor/Property/Standard.php#L66-L106
26,957
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php
Standard.addBasketAddresses
protected function addBasketAddresses( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $newBasket, array $addresses ) { foreach( $addresses as $type => $orderAddresses ) { foreach( $orderAddresses as $orderAddress ) { $newBasket->addAddress( $orderAddress, $type ); } } ...
php
protected function addBasketAddresses( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $newBasket, array $addresses ) { foreach( $addresses as $type => $orderAddresses ) { foreach( $orderAddresses as $orderAddress ) { $newBasket->addAddress( $orderAddress, $type ); } } ...
[ "protected", "function", "addBasketAddresses", "(", "\\", "Aimeos", "\\", "MShop", "\\", "Context", "\\", "Item", "\\", "Iface", "$", "context", ",", "\\", "Aimeos", "\\", "MShop", "\\", "Order", "\\", "Item", "\\", "Base", "\\", "Iface", "$", "newBasket",...
Adds the given addresses to the basket @param \Aimeos\MShop\Context\Item\Iface Context object @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object to add the addresses to @param array $addresses Associative list of type as key and address object implementing \Aimeos\MShop\Order\Item\Base\Address\Iface as v...
[ "Adds", "the", "given", "addresses", "to", "the", "basket" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php#L135-L146
26,958
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php
Standard.addBasketCoupons
protected function addBasketCoupons( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $basket, array $codes ) { /** controller/jobs/subcription/process/renew/standard/use-coupons * Applies the coupons of the previous order also to the new one * * Reuse coupon codes added to t...
php
protected function addBasketCoupons( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $basket, array $codes ) { /** controller/jobs/subcription/process/renew/standard/use-coupons * Applies the coupons of the previous order also to the new one * * Reuse coupon codes added to t...
[ "protected", "function", "addBasketCoupons", "(", "\\", "Aimeos", "\\", "MShop", "\\", "Context", "\\", "Item", "\\", "Iface", "$", "context", ",", "\\", "Aimeos", "\\", "MShop", "\\", "Order", "\\", "Item", "\\", "Base", "\\", "Iface", "$", "basket", ",...
Adds the given coupon codes to basket if enabled @param \Aimeos\MShop\Context\Item\Iface Context object @param \Aimeos\MShop\Order\Item\Base\Iface $basket Order including product and addresses @param array $codes List of coupon codes that should be added to the given basket @return \Aimeos\MShop\Order\Item\Base\Iface ...
[ "Adds", "the", "given", "coupon", "codes", "to", "basket", "if", "enabled" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php#L157-L186
26,959
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php
Standard.addBasketProducts
protected function addBasketProducts( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $newBasket, array $orderProducts, $orderProductId ) { foreach( $orderProducts as $orderProduct ) { if( $orderProduct->getId() == $orderProductId ) { foreach( $orderProduct->getAttributeI...
php
protected function addBasketProducts( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $newBasket, array $orderProducts, $orderProductId ) { foreach( $orderProducts as $orderProduct ) { if( $orderProduct->getId() == $orderProductId ) { foreach( $orderProduct->getAttributeI...
[ "protected", "function", "addBasketProducts", "(", "\\", "Aimeos", "\\", "MShop", "\\", "Context", "\\", "Item", "\\", "Iface", "$", "context", ",", "\\", "Aimeos", "\\", "MShop", "\\", "Order", "\\", "Item", "\\", "Base", "\\", "Iface", "$", "newBasket", ...
Adds the given products to the basket @param \Aimeos\MShop\Context\Item\Iface Context object @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object to add the products to @param \Aimeos\MShop\Order\Item\Base\Product\Iface[] $orderProducts List of product items @param string $orderProductId Unique ID of the o...
[ "Adds", "the", "given", "products", "to", "the", "basket" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php#L198-L213
26,960
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php
Standard.addBasketServices
protected function addBasketServices( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $newBasket, array $services ) { $type = \Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_PAYMENT; if( isset( $services[$type] ) ) { foreach( $services[$type] as $orderService ) { $newBas...
php
protected function addBasketServices( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $newBasket, array $services ) { $type = \Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_PAYMENT; if( isset( $services[$type] ) ) { foreach( $services[$type] as $orderService ) { $newBas...
[ "protected", "function", "addBasketServices", "(", "\\", "Aimeos", "\\", "MShop", "\\", "Context", "\\", "Item", "\\", "Iface", "$", "context", ",", "\\", "Aimeos", "\\", "MShop", "\\", "Order", "\\", "Item", "\\", "Base", "\\", "Iface", "$", "newBasket", ...
Adds a matching delivery and payment service to the basket @param \Aimeos\MShop\Context\Item\Iface Context object @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object to add the services to @param array $services Associative list of type as key and list of service objects implementing \Aimeos\MShop\Order\I...
[ "Adds", "a", "matching", "delivery", "and", "payment", "service", "to", "the", "basket" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php#L224-L257
26,961
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php
Standard.createContext
protected function createContext( $baseId ) { $context = clone $this->getContext(); $manager = \Aimeos\MShop::create( $context, 'order/base' ); $baseItem = $manager->getItem( $baseId ); $locale = $baseItem->getLocale(); $level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL; $manager = \Aimeos\MShop::crea...
php
protected function createContext( $baseId ) { $context = clone $this->getContext(); $manager = \Aimeos\MShop::create( $context, 'order/base' ); $baseItem = $manager->getItem( $baseId ); $locale = $baseItem->getLocale(); $level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL; $manager = \Aimeos\MShop::crea...
[ "protected", "function", "createContext", "(", "$", "baseId", ")", "{", "$", "context", "=", "clone", "$", "this", "->", "getContext", "(", ")", ";", "$", "manager", "=", "\\", "Aimeos", "\\", "MShop", "::", "create", "(", "$", "context", ",", "'order/...
Creates a new context based on the order and the customer the subscription belongs to @param string $baseId Unique order base ID @return \Aimeos\MShop\Context\Item\Iface New context object
[ "Creates", "a", "new", "context", "based", "on", "the", "order", "and", "the", "customer", "the", "subscription", "belongs", "to" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php#L266-L292
26,962
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php
Standard.createOrderBase
protected function createOrderBase( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Subscription\Item\Iface $subscription ) { $manager = \Aimeos\MShop::create( $context, 'order/base' ); $basket = $manager->load( $subscription->getOrderBaseId() ); $newBasket = $manager->createItem()->setCustomerId( $bas...
php
protected function createOrderBase( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Subscription\Item\Iface $subscription ) { $manager = \Aimeos\MShop::create( $context, 'order/base' ); $basket = $manager->load( $subscription->getOrderBaseId() ); $newBasket = $manager->createItem()->setCustomerId( $bas...
[ "protected", "function", "createOrderBase", "(", "\\", "Aimeos", "\\", "MShop", "\\", "Context", "\\", "Item", "\\", "Iface", "$", "context", ",", "\\", "Aimeos", "\\", "MShop", "\\", "Subscription", "\\", "Item", "\\", "Iface", "$", "subscription", ")", "...
Creates and stores a new order for the subscribed product @param \Aimeos\MShop\Context\Item\Iface Context object @param \Aimeos\MShop\Subscription\Item\Iface $subscription Subscription item with order base ID and order product ID @return \Aimeos\MShop\Order\Item\Base\Iface Complete order with product, addresses and se...
[ "Creates", "and", "stores", "a", "new", "order", "for", "the", "subscribed", "product" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php#L302-L315
26,963
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php
Standard.createOrderInvoice
protected function createOrderInvoice( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $basket ) { $manager = \Aimeos\MShop::create( $context, 'order' ); $item = $manager->createItem(); $item->setBaseId( $basket->getId() ); $item->setType( 'subscription' ); return $manager->s...
php
protected function createOrderInvoice( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $basket ) { $manager = \Aimeos\MShop::create( $context, 'order' ); $item = $manager->createItem(); $item->setBaseId( $basket->getId() ); $item->setType( 'subscription' ); return $manager->s...
[ "protected", "function", "createOrderInvoice", "(", "\\", "Aimeos", "\\", "MShop", "\\", "Context", "\\", "Item", "\\", "Iface", "$", "context", ",", "\\", "Aimeos", "\\", "MShop", "\\", "Order", "\\", "Item", "\\", "Base", "\\", "Iface", "$", "basket", ...
Creates and stores a new invoice for the given order basket @param \Aimeos\MShop\Context\Item\Iface Context object @param \Aimeos\MShop\Order\Item\Base\Iface $basket Complete order with product, addresses and services saved to the storage @return \Aimeos\MShop\Order\Item\Iface New invoice item associated to the order ...
[ "Creates", "and", "stores", "a", "new", "invoice", "for", "the", "given", "order", "basket" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php#L325-L334
26,964
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php
Standard.createPayment
protected function createPayment( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $basket, \Aimeos\MShop\Order\Item\Iface $invoice ) { $manager = \Aimeos\MShop::create( $context, 'service' ); foreach( $basket->getService( \Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_PAYMENT ) ...
php
protected function createPayment( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $basket, \Aimeos\MShop\Order\Item\Iface $invoice ) { $manager = \Aimeos\MShop::create( $context, 'service' ); foreach( $basket->getService( \Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_PAYMENT ) ...
[ "protected", "function", "createPayment", "(", "\\", "Aimeos", "\\", "MShop", "\\", "Context", "\\", "Item", "\\", "Iface", "$", "context", ",", "\\", "Aimeos", "\\", "MShop", "\\", "Order", "\\", "Item", "\\", "Base", "\\", "Iface", "$", "basket", ",", ...
Creates a new payment for the given order and invoice @param \Aimeos\MShop\Context\Item\Iface Context object @param \Aimeos\MShop\Order\Item\Base\Iface $basket Complete order with product, addresses and services @param \Aimeos\MShop\Order\Item\Iface New invoice item associated to the order
[ "Creates", "a", "new", "payment", "for", "the", "given", "order", "and", "invoice" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php#L344-L356
26,965
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Catalog/Import/Csv/Standard.php
Standard.getCatalogMap
protected function getCatalogMap( array $domains ) { $map = []; $manager = \Aimeos\MShop::create( $this->getContext(), 'catalog' ); $search = $manager->createSearch()->setSlice( 0, 0x7fffffff ); foreach( $manager->searchItems( $search, $domains ) as $item ) { $map[$item->getCode()] = $item; } return $...
php
protected function getCatalogMap( array $domains ) { $map = []; $manager = \Aimeos\MShop::create( $this->getContext(), 'catalog' ); $search = $manager->createSearch()->setSlice( 0, 0x7fffffff ); foreach( $manager->searchItems( $search, $domains ) as $item ) { $map[$item->getCode()] = $item; } return $...
[ "protected", "function", "getCatalogMap", "(", "array", "$", "domains", ")", "{", "$", "map", "=", "[", "]", ";", "$", "manager", "=", "\\", "Aimeos", "\\", "MShop", "::", "create", "(", "$", "this", "->", "getContext", "(", ")", ",", "'catalog'", ")...
Returns the catalog items building the tree as list @param array $domains List of domain names whose items should be fetched too @return array Associative list of catalog codes as keys and items implementing \Aimeos\MShop\Catalog\Item\Iface as values
[ "Returns", "the", "catalog", "items", "building", "the", "tree", "as", "list" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Catalog/Import/Csv/Standard.php#L507-L518
26,966
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Catalog/Import/Csv/Standard.php
Standard.getParentId
protected function getParentId( array $catalogMap, array $map, $code ) { if( !isset( $map['catalog.parent'] ) ) { $msg = sprintf( 'Required column "%1$s" not found for code "%2$s"', 'catalog.parent', $code ); throw new \Aimeos\Controller\Jobs\Exception( $msg ); } $parent = trim( $map['catalog.parent'] )...
php
protected function getParentId( array $catalogMap, array $map, $code ) { if( !isset( $map['catalog.parent'] ) ) { $msg = sprintf( 'Required column "%1$s" not found for code "%2$s"', 'catalog.parent', $code ); throw new \Aimeos\Controller\Jobs\Exception( $msg ); } $parent = trim( $map['catalog.parent'] )...
[ "protected", "function", "getParentId", "(", "array", "$", "catalogMap", ",", "array", "$", "map", ",", "$", "code", ")", "{", "if", "(", "!", "isset", "(", "$", "map", "[", "'catalog.parent'", "]", ")", ")", "{", "$", "msg", "=", "sprintf", "(", "...
Returns the parent ID of the catalog node for the given code @param array $catalogMap Associative list of catalog items with codes as keys and items implementing \Aimeos\MShop\Catalog\Item\Iface as values @param array $map Associative list of catalog item key/value pairs @param string $code Catalog item code of the pa...
[ "Returns", "the", "parent", "ID", "of", "the", "catalog", "node", "for", "the", "given", "code" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Catalog/Import/Csv/Standard.php#L529-L546
26,967
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Catalog/Import/Csv/Standard.php
Standard.import
protected function import( array &$catalogMap, array $data, array $mapping, \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Iface $processor, $strict ) { $errors = 0; $context = $this->getContext(); $manager = \Aimeos\MShop::create( $context, 'catalog' ); foreach( $data as $code => $list ) { $ma...
php
protected function import( array &$catalogMap, array $data, array $mapping, \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Iface $processor, $strict ) { $errors = 0; $context = $this->getContext(); $manager = \Aimeos\MShop::create( $context, 'catalog' ); foreach( $data as $code => $list ) { $ma...
[ "protected", "function", "import", "(", "array", "&", "$", "catalogMap", ",", "array", "$", "data", ",", "array", "$", "mapping", ",", "\\", "Aimeos", "\\", "Controller", "\\", "Common", "\\", "Catalog", "\\", "Import", "\\", "Csv", "\\", "Processor", "\...
Imports the CSV data and creates new categories or updates existing ones @param array &$catalogMap Associative list of catalog items with codes as keys and items implementing \Aimeos\MShop\Catalog\Item\Iface as values @param array $data Associative list of import data as index/value pairs @param array $mapping Associa...
[ "Imports", "the", "CSV", "data", "and", "creates", "new", "categories", "or", "updates", "existing", "ones" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Catalog/Import/Csv/Standard.php#L560-L623
26,968
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Stock/Import/Csv/Standard.php
Standard.getStockItems
protected function getStockItems( array $codes, array $types ) { $map = []; $manager = \Aimeos\MShop::create( $this->getContext(), 'stock' ); $search = $manager->createSearch()->setSlice( 0, 10000 ); $search->setConditions( $search->combine( '&&', [ $search->compare( '==', 'stock.productcode', $codes ), ...
php
protected function getStockItems( array $codes, array $types ) { $map = []; $manager = \Aimeos\MShop::create( $this->getContext(), 'stock' ); $search = $manager->createSearch()->setSlice( 0, 10000 ); $search->setConditions( $search->combine( '&&', [ $search->compare( '==', 'stock.productcode', $codes ), ...
[ "protected", "function", "getStockItems", "(", "array", "$", "codes", ",", "array", "$", "types", ")", "{", "$", "map", "=", "[", "]", ";", "$", "manager", "=", "\\", "Aimeos", "\\", "MShop", "::", "create", "(", "$", "this", "->", "getContext", "(",...
Returns the stock items for the given codes and types @param array $codes List of stock codes @param array $types List of stock types @return array Multi-dimensional array of code/type/item map
[ "Returns", "the", "stock", "items", "for", "the", "given", "codes", "and", "types" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Stock/Import/Csv/Standard.php#L285-L301
26,969
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Stock/Import/Csv/Standard.php
Standard.importStocks
protected function importStocks( \Aimeos\MW\Container\Content\Iface $content, $maxcnt ) { $total = 0; $manager = \Aimeos\MShop::create( $this->getContext(), 'stock' ); do { $count = 0; $codes = $data = $items = $types = []; while( $content->valid() && $count < $maxcnt ) { $row = $content->cur...
php
protected function importStocks( \Aimeos\MW\Container\Content\Iface $content, $maxcnt ) { $total = 0; $manager = \Aimeos\MShop::create( $this->getContext(), 'stock' ); do { $count = 0; $codes = $data = $items = $types = []; while( $content->valid() && $count < $maxcnt ) { $row = $content->cur...
[ "protected", "function", "importStocks", "(", "\\", "Aimeos", "\\", "MW", "\\", "Container", "\\", "Content", "\\", "Iface", "$", "content", ",", "$", "maxcnt", ")", "{", "$", "total", "=", "0", ";", "$", "manager", "=", "\\", "Aimeos", "\\", "MShop", ...
Imports the CSV data and creates new stocks or updates existing ones @param \Aimeos\MW\Container\Content\Iface $content Content object @return integer Number of imported stocks
[ "Imports", "the", "CSV", "data", "and", "creates", "new", "stocks", "or", "updates", "existing", "ones" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Stock/Import/Csv/Standard.php#L310-L371
26,970
aimeos/ai-controller-jobs
controller/common/src/Controller/Common/Product/Import/Csv/Cache/Attribute/Standard.php
Standard.set
public function set( \Aimeos\MShop\Common\Item\Iface $item ) { $code = $item->getCode(); if( !isset( $this->attributes[$code] ) || !is_array( $this->attributes[$code] ) ) { $this->attributes[$code] = []; } $this->attributes[$code][$item->getType()] = $item; }
php
public function set( \Aimeos\MShop\Common\Item\Iface $item ) { $code = $item->getCode(); if( !isset( $this->attributes[$code] ) || !is_array( $this->attributes[$code] ) ) { $this->attributes[$code] = []; } $this->attributes[$code][$item->getType()] = $item; }
[ "public", "function", "set", "(", "\\", "Aimeos", "\\", "MShop", "\\", "Common", "\\", "Item", "\\", "Iface", "$", "item", ")", "{", "$", "code", "=", "$", "item", "->", "getCode", "(", ")", ";", "if", "(", "!", "isset", "(", "$", "this", "->", ...
Adds the attribute item to the cache @param \Aimeos\MShop\Common\Item\Iface $item Attribute object
[ "Adds", "the", "attribute", "item", "to", "the", "cache" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/common/src/Controller/Common/Product/Import/Csv/Cache/Attribute/Standard.php#L93-L102
26,971
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/plugins/fileeditor/plugin.php
CKFinder_Connector_CommandHandler_FileEditor.buildXml
function buildXml() { if (empty($_POST['CKFinderCommand']) || $_POST['CKFinderCommand'] != 'true') { $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST); } $this->checkConnector(); $this->checkRequest(); // Saving empty file is equal to de...
php
function buildXml() { if (empty($_POST['CKFinderCommand']) || $_POST['CKFinderCommand'] != 'true') { $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST); } $this->checkConnector(); $this->checkRequest(); // Saving empty file is equal to de...
[ "function", "buildXml", "(", ")", "{", "if", "(", "empty", "(", "$", "_POST", "[", "'CKFinderCommand'", "]", ")", "||", "$", "_POST", "[", "'CKFinderCommand'", "]", "!=", "'true'", ")", "{", "$", "this", "->", "_errorHandler", "->", "throwError", "(", ...
handle request and build XML @access protected
[ "handle", "request", "and", "build", "XML" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/plugins/fileeditor/plugin.php#L28-L82
26,972
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Connector.php
CKFinder_Connector_Core_Connector.&
public function &getErrorHandler() { $_errorHandler = $this->_registry->get("errorHandler"); $oErrorHandler =& CKFinder_Connector_Core_Factory::getInstance($_errorHandler); return $oErrorHandler; }
php
public function &getErrorHandler() { $_errorHandler = $this->_registry->get("errorHandler"); $oErrorHandler =& CKFinder_Connector_Core_Factory::getInstance($_errorHandler); return $oErrorHandler; }
[ "public", "function", "&", "getErrorHandler", "(", ")", "{", "$", "_errorHandler", "=", "$", "this", "->", "_registry", "->", "get", "(", "\"errorHandler\"", ")", ";", "$", "oErrorHandler", "=", "&", "CKFinder_Connector_Core_Factory", "::", "getInstance", "(", ...
Get error handler @access public @return CKFinder_Connector_ErrorHandler_Base|CKFinder_Connector_ErrorHandler_FileUpload|CKFinder_Connector_ErrorHandler_Http
[ "Get", "error", "handler" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Connector.php#L115-L120
26,973
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php
CKFinder_Connector_CommandHandler_Unzip.appendErrorNode
protected function appendErrorNode($oErrorsNode, $errorCode=0, $name, $type=null, $path=null) { $oErrorNode = new CKFinder_Connector_Utils_XmlNode("Error"); $oErrorNode->addAttribute("code", $errorCode); $oErrorNode->addAttribute("name", CKFinder_Connector_Utils_FileSystem::convertToConnectorEncoding($nam...
php
protected function appendErrorNode($oErrorsNode, $errorCode=0, $name, $type=null, $path=null) { $oErrorNode = new CKFinder_Connector_Utils_XmlNode("Error"); $oErrorNode->addAttribute("code", $errorCode); $oErrorNode->addAttribute("name", CKFinder_Connector_Utils_FileSystem::convertToConnectorEncoding($nam...
[ "protected", "function", "appendErrorNode", "(", "$", "oErrorsNode", ",", "$", "errorCode", "=", "0", ",", "$", "name", ",", "$", "type", "=", "null", ",", "$", "path", "=", "null", ")", "{", "$", "oErrorNode", "=", "new", "CKFinder_Connector_Utils_XmlNode...
Add error node to the list @param obj $oErrorsNode @param int $errorCode @param string $name @param string $type @param string $path
[ "Add", "error", "node", "to", "the", "list" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php#L196-L208
26,974
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php
CKFinder_Connector_CommandHandler_Unzip.appendUnzippedNode
protected function appendUnzippedNode($oUnzippedNodes, $name, $action='ok') { $oUnzippedNode = new CKFinder_Connector_Utils_XmlNode("File"); $oUnzippedNode->addAttribute("name", CKFinder_Connector_Utils_FileSystem::convertToConnectorEncoding($name)); $oUnzippedNode->addAttribute("action", $action ); $...
php
protected function appendUnzippedNode($oUnzippedNodes, $name, $action='ok') { $oUnzippedNode = new CKFinder_Connector_Utils_XmlNode("File"); $oUnzippedNode->addAttribute("name", CKFinder_Connector_Utils_FileSystem::convertToConnectorEncoding($name)); $oUnzippedNode->addAttribute("action", $action ); $...
[ "protected", "function", "appendUnzippedNode", "(", "$", "oUnzippedNodes", ",", "$", "name", ",", "$", "action", "=", "'ok'", ")", "{", "$", "oUnzippedNode", "=", "new", "CKFinder_Connector_Utils_XmlNode", "(", "\"File\"", ")", ";", "$", "oUnzippedNode", "->", ...
Add unzipped node to the list @param obj $oUnzippedNodes @param string $name @param string $action
[ "Add", "unzipped", "node", "to", "the", "list" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php#L216-L222
26,975
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php
CKFinder_Connector_CommandHandler_Unzip.extractTo
protected function extractTo($extractPath, $extractClientPath, $filePathInfo, $sFileName, $originalFileName) { $sfilePathInfo = pathinfo($extractPath.$sFileName); $extractClientPathDir = $filePathInfo['dirname']; if ( $filePathInfo['dirname'] == '.' ){ $extractClientPathDir = ''; } $folderPa...
php
protected function extractTo($extractPath, $extractClientPath, $filePathInfo, $sFileName, $originalFileName) { $sfilePathInfo = pathinfo($extractPath.$sFileName); $extractClientPathDir = $filePathInfo['dirname']; if ( $filePathInfo['dirname'] == '.' ){ $extractClientPathDir = ''; } $folderPa...
[ "protected", "function", "extractTo", "(", "$", "extractPath", ",", "$", "extractClientPath", ",", "$", "filePathInfo", ",", "$", "sFileName", ",", "$", "originalFileName", ")", "{", "$", "sfilePathInfo", "=", "pathinfo", "(", "$", "extractPath", ".", "$", "...
Extract one file from zip archive @param string $extractPath @param string $extractClientPath @param array $filePathInfo @param string $sFileName @param string $originalFileName
[ "Extract", "one", "file", "from", "zip", "archive" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php#L233-L301
26,976
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php
CKFinder_Connector_CommandHandler_CreateZip.getConfig
protected function getConfig(){ $config = array(); $config['zipMaxSize'] = 'default'; if (isset($GLOBALS['config']['ZipMaxSize']) && (string)$GLOBALS['config']['ZipMaxSize']!='default' ){ $config['zipMaxSize'] = CKFinder_Connector_Utils_Misc::returnBytes((string)$GLOBALS['config']['ZipMaxSize']); ...
php
protected function getConfig(){ $config = array(); $config['zipMaxSize'] = 'default'; if (isset($GLOBALS['config']['ZipMaxSize']) && (string)$GLOBALS['config']['ZipMaxSize']!='default' ){ $config['zipMaxSize'] = CKFinder_Connector_Utils_Misc::returnBytes((string)$GLOBALS['config']['ZipMaxSize']); ...
[ "protected", "function", "getConfig", "(", ")", "{", "$", "config", "=", "array", "(", ")", ";", "$", "config", "[", "'zipMaxSize'", "]", "=", "'default'", ";", "if", "(", "isset", "(", "$", "GLOBALS", "[", "'config'", "]", "[", "'ZipMaxSize'", "]", ...
Get private zip plugin config @access protected @return array
[ "Get", "private", "zip", "plugin", "config" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php#L519-L528
26,977
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php
CKFinder_Connector_CommandHandler_CreateZip.checkOneFile
protected function checkOneFile($file) { $resourceTypeInfo = $this->_currentFolder->getResourceTypeConfig(); $_aclConfig = $this->_config->getAccessControlConfig(); $directory = str_replace('\\','/', $resourceTypeInfo->getDirectory()); $fileName = CKFinder_Connector_Utils_FileSystem::convertToFilesyst...
php
protected function checkOneFile($file) { $resourceTypeInfo = $this->_currentFolder->getResourceTypeConfig(); $_aclConfig = $this->_config->getAccessControlConfig(); $directory = str_replace('\\','/', $resourceTypeInfo->getDirectory()); $fileName = CKFinder_Connector_Utils_FileSystem::convertToFilesyst...
[ "protected", "function", "checkOneFile", "(", "$", "file", ")", "{", "$", "resourceTypeInfo", "=", "$", "this", "->", "_currentFolder", "->", "getResourceTypeConfig", "(", ")", ";", "$", "_aclConfig", "=", "$", "this", "->", "_config", "->", "getAccessControlC...
Checks given file for security @param SplFileInfo $file @access protected @return bool
[ "Checks", "given", "file", "for", "security" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php#L537-L577
26,978
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php
CKFinder_Connector_CommandHandler_CreateZip.getFilesRecursively
protected function getFilesRecursively( $directory, $zipMaxSize ) { $allFiles = array(); $_zipFilesSize = 0; $serverPath = str_replace('\\','/',$directory); foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory), RecursiveIteratorIterator::CHILD_FIRST) as $file ) { if ...
php
protected function getFilesRecursively( $directory, $zipMaxSize ) { $allFiles = array(); $_zipFilesSize = 0; $serverPath = str_replace('\\','/',$directory); foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory), RecursiveIteratorIterator::CHILD_FIRST) as $file ) { if ...
[ "protected", "function", "getFilesRecursively", "(", "$", "directory", ",", "$", "zipMaxSize", ")", "{", "$", "allFiles", "=", "array", "(", ")", ";", "$", "_zipFilesSize", "=", "0", ";", "$", "serverPath", "=", "str_replace", "(", "'\\\\'", ",", "'/'", ...
Get list of all files in given directory, including sub-directories @param string $directory @param int $zipMaxSize Maximum zip file size @return array $allFiles
[ "Get", "list", "of", "all", "files", "in", "given", "directory", "including", "sub", "-", "directories" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php#L586-L618
26,979
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php
CKFinder_Connector_CommandHandler_DownloadZip.sendZipFile
protected function sendZipFile() { if (!function_exists('ob_list_handlers') || ob_list_handlers()) { @ob_end_clean(); } header("Content-Encoding: none"); $this->checkConnector(); $this->checkRequest(); // empty wystarczy if ( empty($_GET['FileName']) ){ $this->_errorHandler->...
php
protected function sendZipFile() { if (!function_exists('ob_list_handlers') || ob_list_handlers()) { @ob_end_clean(); } header("Content-Encoding: none"); $this->checkConnector(); $this->checkRequest(); // empty wystarczy if ( empty($_GET['FileName']) ){ $this->_errorHandler->...
[ "protected", "function", "sendZipFile", "(", ")", "{", "if", "(", "!", "function_exists", "(", "'ob_list_handlers'", ")", "||", "ob_list_handlers", "(", ")", ")", "{", "@", "ob_end_clean", "(", ")", ";", "}", "header", "(", "\"Content-Encoding: none\"", ")", ...
Sends generated zip file to the user
[ "Sends", "generated", "zip", "file", "to", "the", "user" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/plugins/zip/plugin.php#L857-L921
26,980
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Utils/XmlNode.php
Ckfinder_Connector_Utils_XmlNode.asUTF8
public function asUTF8($string) { if (CKFinder_Connector_Utils_Misc::isValidUTF8($string)) { return $string; } $ret = ""; for ($i = 0; $i < strlen($string); $i++) { $ret .= CKFinder_Connector_Utils_Misc::isValidUTF8($string[$i]) ? $string[$i] : "?"; }...
php
public function asUTF8($string) { if (CKFinder_Connector_Utils_Misc::isValidUTF8($string)) { return $string; } $ret = ""; for ($i = 0; $i < strlen($string); $i++) { $ret .= CKFinder_Connector_Utils_Misc::isValidUTF8($string[$i]) ? $string[$i] : "?"; }...
[ "public", "function", "asUTF8", "(", "$", "string", ")", "{", "if", "(", "CKFinder_Connector_Utils_Misc", "::", "isValidUTF8", "(", "$", "string", ")", ")", "{", "return", "$", "string", ";", "}", "$", "ret", "=", "\"\"", ";", "for", "(", "$", "i", "...
Checks whether the string is valid UTF8 @param string $string
[ "Checks", "whether", "the", "string", "is", "valid", "UTF8" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Utils/XmlNode.php#L146-L158
26,981
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Utils/XmlNode.php
Ckfinder_Connector_Utils_XmlNode.asXML
public function asXML() { $ret = "<" . $this->_name; //print Attributes if (sizeof($this->_attributes)>0) { foreach ($this->_attributes as $_name => $_value) { $ret .= " " . $_name . '="' . $this->asUTF8(htmlspecialchars($_value)) . '"'; } } ...
php
public function asXML() { $ret = "<" . $this->_name; //print Attributes if (sizeof($this->_attributes)>0) { foreach ($this->_attributes as $_name => $_value) { $ret .= " " . $_name . '="' . $this->asUTF8(htmlspecialchars($_value)) . '"'; } } ...
[ "public", "function", "asXML", "(", ")", "{", "$", "ret", "=", "\"<\"", ".", "$", "this", "->", "_name", ";", "//print Attributes", "if", "(", "sizeof", "(", "$", "this", "->", "_attributes", ")", ">", "0", ")", "{", "foreach", "(", "$", "this", "-...
Return a well-formed XML string based on Ckfinder_Connector_Utils_XmlNode element @return string @access public
[ "Return", "a", "well", "-", "formed", "XML", "string", "based", "on", "Ckfinder_Connector_Utils_XmlNode", "element" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Utils/XmlNode.php#L166-L201
26,982
pr-of-it/t4
framework/Core/Config.php
Config.save
public function save() { $str = $this->prepareForSave($this->toArray()); if (empty($this->__path)) { throw new Exception('Empty path for config save'); } file_put_contents($this->__path, '<?php' . PHP_EOL . PHP_EOL . 'return ' . $str . ';'); return $this; }
php
public function save() { $str = $this->prepareForSave($this->toArray()); if (empty($this->__path)) { throw new Exception('Empty path for config save'); } file_put_contents($this->__path, '<?php' . PHP_EOL . PHP_EOL . 'return ' . $str . ';'); return $this; }
[ "public", "function", "save", "(", ")", "{", "$", "str", "=", "$", "this", "->", "prepareForSave", "(", "$", "this", "->", "toArray", "(", ")", ")", ";", "if", "(", "empty", "(", "$", "this", "->", "__path", ")", ")", "{", "throw", "new", "Except...
Saves config file @return $this @throws \T4\Core\Exception
[ "Saves", "config", "file" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Core/Config.php#L70-L78
26,983
pr-of-it/t4
framework/Core/Config.php
Config.prepareForSave
protected function prepareForSave(array $data) : string { $str = var_export($data, true); $str = preg_replace(['~^(\s*)array\s*\($~im', '~^(\s*)\)(\,?)$~im', '~\s+$~im'], ['$1[', '$1]$2', ''], $str); return $str; }
php
protected function prepareForSave(array $data) : string { $str = var_export($data, true); $str = preg_replace(['~^(\s*)array\s*\($~im', '~^(\s*)\)(\,?)$~im', '~\s+$~im'], ['$1[', '$1]$2', ''], $str); return $str; }
[ "protected", "function", "prepareForSave", "(", "array", "$", "data", ")", ":", "string", "{", "$", "str", "=", "var_export", "(", "$", "data", ",", "true", ")", ";", "$", "str", "=", "preg_replace", "(", "[", "'~^(\\s*)array\\s*\\($~im'", ",", "'~^(\\s*)\...
Prepares array representation for save in PHP file @param array $data @return string
[ "Prepares", "array", "representation", "for", "save", "in", "PHP", "file" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Core/Config.php#L98-L103
26,984
aimeos/ai-controller-jobs
controller/common/src/Controller/Common/Product/Import/Csv/Cache/Product/Standard.php
Standard.get
public function get( $code, $type = null ) { if( isset( $this->prodmap[$code] ) ) { return $this->prodmap[$code]; } $manager = \Aimeos\MShop::create( $this->getContext(), 'product' ); $search = $manager->createSearch(); $search->setConditions( $search->compare( '==', 'product.code', $code ) ); $resul...
php
public function get( $code, $type = null ) { if( isset( $this->prodmap[$code] ) ) { return $this->prodmap[$code]; } $manager = \Aimeos\MShop::create( $this->getContext(), 'product' ); $search = $manager->createSearch(); $search->setConditions( $search->compare( '==', 'product.code', $code ) ); $resul...
[ "public", "function", "get", "(", "$", "code", ",", "$", "type", "=", "null", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "prodmap", "[", "$", "code", "]", ")", ")", "{", "return", "$", "this", "->", "prodmap", "[", "$", "code", "]", ...
Returns the product ID for the given code @param string $code Product code @param string|null $type Attribute type @return string|null Product ID or null if not found
[ "Returns", "the", "product", "ID", "for", "the", "given", "code" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/common/src/Controller/Common/Product/Import/Csv/Cache/Product/Standard.php#L45-L63
26,985
aimeos/ai-controller-jobs
controller/common/src/Controller/Common/Product/Import/Csv/Cache/Product/Standard.php
Standard.set
public function set( \Aimeos\MShop\Common\Item\Iface $item ) { $this->prodmap[$item->getCode()] = $item->getId(); }
php
public function set( \Aimeos\MShop\Common\Item\Iface $item ) { $this->prodmap[$item->getCode()] = $item->getId(); }
[ "public", "function", "set", "(", "\\", "Aimeos", "\\", "MShop", "\\", "Common", "\\", "Item", "\\", "Iface", "$", "item", ")", "{", "$", "this", "->", "prodmap", "[", "$", "item", "->", "getCode", "(", ")", "]", "=", "$", "item", "->", "getId", ...
Adds the product ID to the cache @param \Aimeos\MShop\Common\Item\Iface $item Product object
[ "Adds", "the", "product", "ID", "to", "the", "cache" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/common/src/Controller/Common/Product/Import/Csv/Cache/Product/Standard.php#L71-L74
26,986
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php
CKFinder_Connector_Core_Config.getHideFoldersRegex
public function getHideFoldersRegex() { static $folderRegex; if (!isset($folderRegex)) { if (is_array($this->_hideFolders) && $this->_hideFolders) { $folderRegex = join("|", $this->_hideFolders); $folderRegex = strtr($folderRegex, array("?" => "__QMK__", ...
php
public function getHideFoldersRegex() { static $folderRegex; if (!isset($folderRegex)) { if (is_array($this->_hideFolders) && $this->_hideFolders) { $folderRegex = join("|", $this->_hideFolders); $folderRegex = strtr($folderRegex, array("?" => "__QMK__", ...
[ "public", "function", "getHideFoldersRegex", "(", ")", "{", "static", "$", "folderRegex", ";", "if", "(", "!", "isset", "(", "$", "folderRegex", ")", ")", "{", "if", "(", "is_array", "(", "$", "this", "->", "_hideFolders", ")", "&&", "$", "this", "->",...
Get regular expression to hide folders @access public @return array
[ "Get", "regular", "expression", "to", "hide", "folders" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php#L273-L291
26,987
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php
CKFinder_Connector_Core_Config.getHideFilesRegex
public function getHideFilesRegex() { static $fileRegex; if (!isset($fileRegex)) { if (is_array($this->_hideFiles) && $this->_hideFiles) { $fileRegex = join("|", $this->_hideFiles); $fileRegex = strtr($fileRegex, array("?" => "__QMK__", "*" => "__AST__", ...
php
public function getHideFilesRegex() { static $fileRegex; if (!isset($fileRegex)) { if (is_array($this->_hideFiles) && $this->_hideFiles) { $fileRegex = join("|", $this->_hideFiles); $fileRegex = strtr($fileRegex, array("?" => "__QMK__", "*" => "__AST__", ...
[ "public", "function", "getHideFilesRegex", "(", ")", "{", "static", "$", "fileRegex", ";", "if", "(", "!", "isset", "(", "$", "fileRegex", ")", ")", "{", "if", "(", "is_array", "(", "$", "this", "->", "_hideFiles", ")", "&&", "$", "this", "->", "_hid...
Get regular expression to hide files @access public @return array
[ "Get", "regular", "expression", "to", "hide", "files" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php#L299-L317
26,988
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php
CKFinder_Connector_Core_Config.&
public function &getResourceTypeConfig($resourceTypeName) { $_null = null; if (isset($this->_resourceTypeConfigCache[$resourceTypeName])) { return $this->_resourceTypeConfigCache[$resourceTypeName]; } if (!isset($GLOBALS['config']['ResourceType']) || !is_array($GLOBALS[...
php
public function &getResourceTypeConfig($resourceTypeName) { $_null = null; if (isset($this->_resourceTypeConfigCache[$resourceTypeName])) { return $this->_resourceTypeConfigCache[$resourceTypeName]; } if (!isset($GLOBALS['config']['ResourceType']) || !is_array($GLOBALS[...
[ "public", "function", "&", "getResourceTypeConfig", "(", "$", "resourceTypeName", ")", "{", "$", "_null", "=", "null", ";", "if", "(", "isset", "(", "$", "this", "->", "_resourceTypeConfigCache", "[", "$", "resourceTypeName", "]", ")", ")", "{", "return", ...
Get resourceTypeName config @param string $resourceTypeName @return CKFinder_Connector_Core_ResourceTypeConfig|null @access public
[ "Get", "resourceTypeName", "config" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php#L425-L447
26,989
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php
CKFinder_Connector_Core_Config.&
public function &getThumbnailsConfig() { if (!isset($this->_thumbnailsConfigCache)) { $this->_thumbnailsConfigCache = new CKFinder_Connector_Core_ThumbnailsConfig(isset($GLOBALS['config']['Thumbnails']) ? $GLOBALS['config']['Thumbnails'] : array()); } return $this->_thumbnailsCo...
php
public function &getThumbnailsConfig() { if (!isset($this->_thumbnailsConfigCache)) { $this->_thumbnailsConfigCache = new CKFinder_Connector_Core_ThumbnailsConfig(isset($GLOBALS['config']['Thumbnails']) ? $GLOBALS['config']['Thumbnails'] : array()); } return $this->_thumbnailsCo...
[ "public", "function", "&", "getThumbnailsConfig", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "_thumbnailsConfigCache", ")", ")", "{", "$", "this", "->", "_thumbnailsConfigCache", "=", "new", "CKFinder_Connector_Core_ThumbnailsConfig", "(", "...
Get thumbnails config @access public @return CKFinder_Connector_Core_ThumbnailsConfig
[ "Get", "thumbnails", "config" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php#L455-L462
26,990
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php
CKFinder_Connector_Core_Config.&
public function &getImagesConfig() { if (!isset($this->_imagesConfigCache)) { $this->_imagesConfigCache = new CKFinder_Connector_Core_ImagesConfig(isset($GLOBALS['config']['Images']) ? $GLOBALS['config']['Images'] : array()); } return $this->_imagesConfigCache; }
php
public function &getImagesConfig() { if (!isset($this->_imagesConfigCache)) { $this->_imagesConfigCache = new CKFinder_Connector_Core_ImagesConfig(isset($GLOBALS['config']['Images']) ? $GLOBALS['config']['Images'] : array()); } return $this->_imagesConfigCache; }
[ "public", "function", "&", "getImagesConfig", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "_imagesConfigCache", ")", ")", "{", "$", "this", "->", "_imagesConfigCache", "=", "new", "CKFinder_Connector_Core_ImagesConfig", "(", "isset", "(", ...
Get images config @access public @return CKFinder_Connector_Core_ImagesConfig
[ "Get", "images", "config" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php#L470-L477
26,991
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php
CKFinder_Connector_Core_Config.&
public function &getAccessControlConfig() { if (!isset($this->_accessControlConfigCache)) { $this->_accessControlConfigCache = new CKFinder_Connector_Core_AccessControlConfig(isset($GLOBALS['config']['AccessControl']) ? $GLOBALS['config']['AccessControl'] : array()); } return $t...
php
public function &getAccessControlConfig() { if (!isset($this->_accessControlConfigCache)) { $this->_accessControlConfigCache = new CKFinder_Connector_Core_AccessControlConfig(isset($GLOBALS['config']['AccessControl']) ? $GLOBALS['config']['AccessControl'] : array()); } return $t...
[ "public", "function", "&", "getAccessControlConfig", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "_accessControlConfigCache", ")", ")", "{", "$", "this", "->", "_accessControlConfigCache", "=", "new", "CKFinder_Connector_Core_AccessControlConfig"...
Get access control config @access public @return CKFinder_Connector_Core_AccessControlConfig
[ "Get", "access", "control", "config" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php#L485-L492
26,992
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php
CKFinder_Connector_Core_Config.getResourceTypeNames
public function getResourceTypeNames() { if (!isset($GLOBALS['config']['ResourceType']) || !is_array($GLOBALS['config']['ResourceType'])) { return array(); } $_names = array(); foreach ($GLOBALS['config']['ResourceType'] as $key => $_resourceType) { if (isset...
php
public function getResourceTypeNames() { if (!isset($GLOBALS['config']['ResourceType']) || !is_array($GLOBALS['config']['ResourceType'])) { return array(); } $_names = array(); foreach ($GLOBALS['config']['ResourceType'] as $key => $_resourceType) { if (isset...
[ "public", "function", "getResourceTypeNames", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "GLOBALS", "[", "'config'", "]", "[", "'ResourceType'", "]", ")", "||", "!", "is_array", "(", "$", "GLOBALS", "[", "'config'", "]", "[", "'ResourceType'", "]"...
Get all resource type names defined in config @return array @access public
[ "Get", "all", "resource", "type", "names", "defined", "in", "config" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/Config.php#L569-L583
26,993
aimeos/ai-controller-jobs
controller/common/src/Controller/Common/Product/Import/Csv/Processor/Attribute/Standard.php
Standard.process
public function process( \Aimeos\MShop\Product\Item\Iface $product, array $data ) { $context = $this->getContext(); $listManager = \Aimeos\MShop::create( $context, 'product/lists' ); $separator = $context->getConfig()->get( 'controller/common/product/import/csv/separator', "\n" ); $listMap = []; $map = $thi...
php
public function process( \Aimeos\MShop\Product\Item\Iface $product, array $data ) { $context = $this->getContext(); $listManager = \Aimeos\MShop::create( $context, 'product/lists' ); $separator = $context->getConfig()->get( 'controller/common/product/import/csv/separator', "\n" ); $listMap = []; $map = $thi...
[ "public", "function", "process", "(", "\\", "Aimeos", "\\", "MShop", "\\", "Product", "\\", "Item", "\\", "Iface", "$", "product", ",", "array", "$", "data", ")", "{", "$", "context", "=", "$", "this", "->", "getContext", "(", ")", ";", "$", "listMan...
Saves the attribute related data to the storage @param \Aimeos\MShop\Product\Item\Iface $product Product item with associated items @param array $data List of CSV fields with position as key and data as value @return array List of data which hasn't been imported
[ "Saves", "the", "attribute", "related", "data", "to", "the", "storage" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/common/src/Controller/Common/Product/Import/Csv/Processor/Attribute/Standard.php#L113-L165
26,994
antonmedv/purephp
src/Command/DeleteCommand.php
DeleteCommand.run
public function run($arguments, ConnectionInterface $connection) { list($name) = $arguments; if (isset($this->server[$name])) { unset($this->server[$name]); return true; } else { return false; } }
php
public function run($arguments, ConnectionInterface $connection) { list($name) = $arguments; if (isset($this->server[$name])) { unset($this->server[$name]); return true; } else { return false; } }
[ "public", "function", "run", "(", "$", "arguments", ",", "ConnectionInterface", "$", "connection", ")", "{", "list", "(", "$", "name", ")", "=", "$", "arguments", ";", "if", "(", "isset", "(", "$", "this", "->", "server", "[", "$", "name", "]", ")", ...
Run delete storage command. @param array $arguments @param ConnectionInterface $connection @return bool
[ "Run", "delete", "storage", "command", "." ]
05aa6b44cea9b0457ec1e5e67e8278cd89d47f21
https://github.com/antonmedv/purephp/blob/05aa6b44cea9b0457ec1e5e67e8278cd89d47f21/src/Command/DeleteCommand.php#L35-L45
26,995
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Utils/Security.php
CKFinder_Connector_Utils_Security.getRidOfMagicQuotes
public function getRidOfMagicQuotes() { if (CKFINDER_CONNECTOR_PHP_MODE<6 && get_magic_quotes_gpc()) { if (!empty($_GET)) { $this->stripQuotes($_GET); } if (!empty($_POST)) { $this->stripQuotes($_POST); } if (!empty(...
php
public function getRidOfMagicQuotes() { if (CKFINDER_CONNECTOR_PHP_MODE<6 && get_magic_quotes_gpc()) { if (!empty($_GET)) { $this->stripQuotes($_GET); } if (!empty($_POST)) { $this->stripQuotes($_POST); } if (!empty(...
[ "public", "function", "getRidOfMagicQuotes", "(", ")", "{", "if", "(", "CKFINDER_CONNECTOR_PHP_MODE", "<", "6", "&&", "get_magic_quotes_gpc", "(", ")", ")", "{", "if", "(", "!", "empty", "(", "$", "_GET", ")", ")", "{", "$", "this", "->", "stripQuotes", ...
Strip quotes from global arrays @access public
[ "Strip", "quotes", "from", "global", "arrays" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Utils/Security.php#L33-L53
26,996
pr-of-it/t4
framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Utils/Security.php
CKFinder_Connector_Utils_Security.stripQuotes
public function stripQuotes(&$var, $depth=0, $howDeep=5) { if (is_array($var)) { if ($depth++<$howDeep) { while (list($k,$v) = each($var)) { $this->stripQuotes($var[$k], $depth, $howDeep); } } } else { $var = str...
php
public function stripQuotes(&$var, $depth=0, $howDeep=5) { if (is_array($var)) { if ($depth++<$howDeep) { while (list($k,$v) = each($var)) { $this->stripQuotes($var[$k], $depth, $howDeep); } } } else { $var = str...
[ "public", "function", "stripQuotes", "(", "&", "$", "var", ",", "$", "depth", "=", "0", ",", "$", "howDeep", "=", "5", ")", "{", "if", "(", "is_array", "(", "$", "var", ")", ")", "{", "if", "(", "$", "depth", "++", "<", "$", "howDeep", ")", "...
Strip quotes from variable @access public @param mixed $var @param int $depth current depth @param int $howDeep maximum depth
[ "Strip", "quotes", "from", "variable" ]
8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada
https://github.com/pr-of-it/t4/blob/8a8133e0b3abca9d7718fbdcf65b70c2d85b5ada/framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Utils/Security.php#L63-L74
26,997
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Catalog/Import/Xml/Standard.php
Standard.importNode
protected function importNode( \DomElement $node, $domains, $parentid, array &$map ) { $manager = \Aimeos\MShop::create( $this->getContext(), 'catalog' ); if( ( $attr = $node->attributes->getNamedItem( 'ref' ) ) !== null ) { try { $item = $manager->findItem( $attr->nodeValue, $domains ); $manager-...
php
protected function importNode( \DomElement $node, $domains, $parentid, array &$map ) { $manager = \Aimeos\MShop::create( $this->getContext(), 'catalog' ); if( ( $attr = $node->attributes->getNamedItem( 'ref' ) ) !== null ) { try { $item = $manager->findItem( $attr->nodeValue, $domains ); $manager-...
[ "protected", "function", "importNode", "(", "\\", "DomElement", "$", "node", ",", "$", "domains", ",", "$", "parentid", ",", "array", "&", "$", "map", ")", "{", "$", "manager", "=", "\\", "Aimeos", "\\", "MShop", "::", "create", "(", "$", "this", "->...
Imports a single category node @param \DomElement $node DOM node of "catalogitem" element @param string[] $domains List of domain names whose referenced items will be updated in the catalog items @param string|null $parentid ID of the parent catalog node @param array &$map Will contain the associative list of code/ID ...
[ "Imports", "a", "single", "category", "node" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Catalog/Import/Xml/Standard.php#L215-L243
26,998
aimeos/ai-controller-jobs
controller/jobs/src/Controller/Jobs/Catalog/Import/Xml/Standard.php
Standard.importTree
protected function importTree( \XMLReader $xml, array $domains, $parentid = null, array $map = [] ) { $total = 0; $childMap = []; $currentid = $parentid; while( $xml->read() === true ) { if( $xml->nodeType === \XMLReader::ELEMENT && $xml->name === 'catalogitem' ) { if( ( $node = $xml->expand() ) =...
php
protected function importTree( \XMLReader $xml, array $domains, $parentid = null, array $map = [] ) { $total = 0; $childMap = []; $currentid = $parentid; while( $xml->read() === true ) { if( $xml->nodeType === \XMLReader::ELEMENT && $xml->name === 'catalogitem' ) { if( ( $node = $xml->expand() ) =...
[ "protected", "function", "importTree", "(", "\\", "XMLReader", "$", "xml", ",", "array", "$", "domains", ",", "$", "parentid", "=", "null", ",", "array", "$", "map", "=", "[", "]", ")", "{", "$", "total", "=", "0", ";", "$", "childMap", "=", "[", ...
Imports the catalog document @param \XMLReader $xml Catalog document to import @param string[] $domains List of domain names whose referenced items will be updated in the catalog items @param string|null $parentid ID of the parent catalog node @param array $map Associative list of catalog code as keys and category ID ...
[ "Imports", "the", "catalog", "document" ]
e4a2fc47850f72907afff68858a2be5865fa4664
https://github.com/aimeos/ai-controller-jobs/blob/e4a2fc47850f72907afff68858a2be5865fa4664/controller/jobs/src/Controller/Jobs/Catalog/Import/Xml/Standard.php#L254-L288
26,999
antonmedv/purephp
src/Server.php
Server.run
public function run() { $this->log("Server listening on {$this->host}:{$this->port}"); $this->socket->listen($this->port, $this->host); $this->loop->run(); }
php
public function run() { $this->log("Server listening on {$this->host}:{$this->port}"); $this->socket->listen($this->port, $this->host); $this->loop->run(); }
[ "public", "function", "run", "(", ")", "{", "$", "this", "->", "log", "(", "\"Server listening on {$this->host}:{$this->port}\"", ")", ";", "$", "this", "->", "socket", "->", "listen", "(", "$", "this", "->", "port", ",", "$", "this", "->", "host", ")", ...
Start event loop.
[ "Start", "event", "loop", "." ]
05aa6b44cea9b0457ec1e5e67e8278cd89d47f21
https://github.com/antonmedv/purephp/blob/05aa6b44cea9b0457ec1e5e67e8278cd89d47f21/src/Server.php#L75-L80