repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
yuncms/framework
src/admin/UserItemController.php
UserItemController.actionIndex
public function actionIndex() { $searchModel = new UserAuthItemSearch(['type' => $this->type]); $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams()); return $this->render('index', [ 'dataProvider' => $dataProvider, 'searchModel' => $searchModel,...
php
public function actionIndex() { $searchModel = new UserAuthItemSearch(['type' => $this->type]); $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams()); return $this->render('index', [ 'dataProvider' => $dataProvider, 'searchModel' => $searchModel,...
[ "public", "function", "actionIndex", "(", ")", "{", "$", "searchModel", "=", "new", "UserAuthItemSearch", "(", "[", "'type'", "=>", "$", "this", "->", "type", "]", ")", ";", "$", "dataProvider", "=", "$", "searchModel", "->", "search", "(", "Yii", "::", ...
Lists all AuthItem models. @return mixed @throws \yii\base\InvalidConfigException
[ "Lists", "all", "AuthItem", "models", "." ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/admin/UserItemController.php#L48-L57
yuncms/framework
src/admin/UserItemController.php
UserItemController.actionCreate
public function actionCreate() { $model = new UserAuthItem(null); $model->type = $this->type; if ($model->load(Yii::$app->getRequest()->post()) && $model->save()) { Yii::$app->getSession()->setFlash('success', Yii::t('yuncms','Create success.')); return $this->redirec...
php
public function actionCreate() { $model = new UserAuthItem(null); $model->type = $this->type; if ($model->load(Yii::$app->getRequest()->post()) && $model->save()) { Yii::$app->getSession()->setFlash('success', Yii::t('yuncms','Create success.')); return $this->redirec...
[ "public", "function", "actionCreate", "(", ")", "{", "$", "model", "=", "new", "UserAuthItem", "(", "null", ")", ";", "$", "model", "->", "type", "=", "$", "this", "->", "type", ";", "if", "(", "$", "model", "->", "load", "(", "Yii", "::", "$", "...
Creates a new AuthItem model. If creation is successful, the browser will be redirected to the 'view' page. @return mixed @throws \Exception
[ "Creates", "a", "new", "AuthItem", "model", ".", "If", "creation", "is", "successful", "the", "browser", "will", "be", "redirected", "to", "the", "view", "page", "." ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/admin/UserItemController.php#L79-L89
yuncms/framework
src/admin/UserItemController.php
UserItemController.actionDelete
public function actionDelete($id) { $model = $this->findModel($id); Yii::$app->getUserAuthManager()->remove($model->item); UserRBACHelper::invalidate(); return $this->redirect(['index']); }
php
public function actionDelete($id) { $model = $this->findModel($id); Yii::$app->getUserAuthManager()->remove($model->item); UserRBACHelper::invalidate(); return $this->redirect(['index']); }
[ "public", "function", "actionDelete", "(", "$", "id", ")", "{", "$", "model", "=", "$", "this", "->", "findModel", "(", "$", "id", ")", ";", "Yii", "::", "$", "app", "->", "getUserAuthManager", "(", ")", "->", "remove", "(", "$", "model", "->", "it...
Deletes an existing AuthItem model. If deletion is successful, the browser will be redirected to the 'index' page. @param string $id @return mixed @throws NotFoundHttpException @throws \yii\base\InvalidConfigException
[ "Deletes", "an", "existing", "AuthItem", "model", ".", "If", "deletion", "is", "successful", "the", "browser", "will", "be", "redirected", "to", "the", "index", "page", "." ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/admin/UserItemController.php#L117-L123
yuncms/framework
src/admin/UserItemController.php
UserItemController.findModel
protected function findModel($id) { $auth = Yii::$app->getUserAuthManager(); $item = $this->type === Item::TYPE_ROLE ? $auth->getRole($id) : $auth->getPermission($id); if ($item) { return new UserAuthItem($item); } else { throw new NotFoundHttpException(Yii::t...
php
protected function findModel($id) { $auth = Yii::$app->getUserAuthManager(); $item = $this->type === Item::TYPE_ROLE ? $auth->getRole($id) : $auth->getPermission($id); if ($item) { return new UserAuthItem($item); } else { throw new NotFoundHttpException(Yii::t...
[ "protected", "function", "findModel", "(", "$", "id", ")", "{", "$", "auth", "=", "Yii", "::", "$", "app", "->", "getUserAuthManager", "(", ")", ";", "$", "item", "=", "$", "this", "->", "type", "===", "Item", "::", "TYPE_ROLE", "?", "$", "auth", "...
Finds the AuthItem model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown. @param string $id @return UserAuthItem the loaded model @throws NotFoundHttpException if the model cannot be found @throws \yii\base\InvalidConfigException
[ "Finds", "the", "AuthItem", "model", "based", "on", "its", "primary", "key", "value", ".", "If", "the", "model", "is", "not", "found", "a", "404", "HTTP", "exception", "will", "be", "thrown", "." ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/admin/UserItemController.php#L191-L200
phug-php/formatter
src/Phug/Formatter/Element/AbstractMarkupElement.php
AbstractMarkupElement.belongsTo
public function belongsTo(array $tagList) { if (is_string($this->getName())) { return in_array(strtolower($this->getName()), $tagList); } return false; }
php
public function belongsTo(array $tagList) { if (is_string($this->getName())) { return in_array(strtolower($this->getName()), $tagList); } return false; }
[ "public", "function", "belongsTo", "(", "array", "$", "tagList", ")", "{", "if", "(", "is_string", "(", "$", "this", "->", "getName", "(", ")", ")", ")", "{", "return", "in_array", "(", "strtolower", "(", "$", "this", "->", "getName", "(", ")", ")", ...
Return true if the tag name is in the given list. @param array $tagList @return bool
[ "Return", "true", "if", "the", "tag", "name", "is", "in", "the", "given", "list", "." ]
train
https://github.com/phug-php/formatter/blob/3f9286a169a0d45b8b8acc1fae64e880ebdb567e/src/Phug/Formatter/Element/AbstractMarkupElement.php#L19-L26
qcubed/orm
src/Database/Mysqli5/MysqliRow.php
MysqliRow.getColumn
public function getColumn($strColumnName, $strColumnType = null) { if (!isset($this->strColumnArray[$strColumnName])) { return null; } $strColumnValue = $this->strColumnArray[$strColumnName]; switch ($strColumnType) { case FieldType::BIT: // A...
php
public function getColumn($strColumnName, $strColumnType = null) { if (!isset($this->strColumnArray[$strColumnName])) { return null; } $strColumnValue = $this->strColumnArray[$strColumnName]; switch ($strColumnType) { case FieldType::BIT: // A...
[ "public", "function", "getColumn", "(", "$", "strColumnName", ",", "$", "strColumnType", "=", "null", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "strColumnArray", "[", "$", "strColumnName", "]", ")", ")", "{", "return", "null", ";", "}"...
Gets the value of a column from a result row returned by the database @param string $strColumnName Name of the column @param null|string $strColumnType A FieldType string @return mixed
[ "Gets", "the", "value", "of", "a", "column", "from", "a", "result", "row", "returned", "by", "the", "database" ]
train
https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Database/Mysqli5/MysqliRow.php#L39-L78
shrink0r/workflux
src/Builder/StateMachineSchema.php
StateMachineSchema.getStateSchema
private function getStateSchema(): array { return [ "type" => "assoc" , "required" => false, "properties" => [ "class" => [ "type" => "fqcn", "required" => false ], "initial" => [ "type" => "bool", "r...
php
private function getStateSchema(): array { return [ "type" => "assoc" , "required" => false, "properties" => [ "class" => [ "type" => "fqcn", "required" => false ], "initial" => [ "type" => "bool", "r...
[ "private", "function", "getStateSchema", "(", ")", ":", "array", "{", "return", "[", "\"type\"", "=>", "\"assoc\"", ",", "\"required\"", "=>", "false", ",", "\"properties\"", "=>", "[", "\"class\"", "=>", "[", "\"type\"", "=>", "\"fqcn\"", ",", "\"required\"",...
Return php-schema definition that reflects the structural expectations towards state (yaml)data. @return mixed[]
[ "Return", "php", "-", "schema", "definition", "that", "reflects", "the", "structural", "expectations", "towards", "state", "(", "yaml", ")", "data", "." ]
train
https://github.com/shrink0r/workflux/blob/008f45c64f52b1f795ab7f6ddbfc1a55580254d9/src/Builder/StateMachineSchema.php#L101-L161
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.getDtCall
public function getDtCall($format = null) { if ($this->dt_call === null) { return null; } if ($this->dt_call === '0000-00-00 00:00:00') { // while technically this is not a default value of null, // this seems to be closest in meaning. return ...
php
public function getDtCall($format = null) { if ($this->dt_call === null) { return null; } if ($this->dt_call === '0000-00-00 00:00:00') { // while technically this is not a default value of null, // this seems to be closest in meaning. return ...
[ "public", "function", "getDtCall", "(", "$", "format", "=", "null", ")", "{", "if", "(", "$", "this", "->", "dt_call", "===", "null", ")", "{", "return", "null", ";", "}", "if", "(", "$", "this", "->", "dt_call", "===", "'0000-00-00 00:00:00'", ")", ...
Get the [optionally formatted] temporal [dt_call] column value. @param string $format The date/time format string (either date()-style or strftime()-style). If format is null, then the raw DateTime object will be returned. @return mixed Formatted date/time value as string or DateTime object (if format is null), null ...
[ "Get", "the", "[", "optionally", "formatted", "]", "temporal", "[", "dt_call", "]", "column", "value", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L118-L147
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.setDtCall
public function setDtCall($v) { $dt = PropelDateTime::newInstance($v, null, 'DateTime'); if ($this->dt_call !== null || $dt !== null) { $currentDateAsString = ($this->dt_call !== null && $tmpDt = new DateTime($this->dt_call)) ? $tmpDt->format('Y-m-d H:i:s') : null; $newDateAs...
php
public function setDtCall($v) { $dt = PropelDateTime::newInstance($v, null, 'DateTime'); if ($this->dt_call !== null || $dt !== null) { $currentDateAsString = ($this->dt_call !== null && $tmpDt = new DateTime($this->dt_call)) ? $tmpDt->format('Y-m-d H:i:s') : null; $newDateAs...
[ "public", "function", "setDtCall", "(", "$", "v", ")", "{", "$", "dt", "=", "PropelDateTime", "::", "newInstance", "(", "$", "v", ",", "null", ",", "'DateTime'", ")", ";", "if", "(", "$", "this", "->", "dt_call", "!==", "null", "||", "$", "dt", "!=...
Sets the value of [dt_call] column to a normalized version of the date/time value specified. @param mixed $v string, integer (timestamp), or DateTime value. Empty strings are treated as null. @return ApiLog The current object (for fluent API support)
[ "Sets", "the", "value", "of", "[", "dt_call", "]", "column", "to", "a", "normalized", "version", "of", "the", "date", "/", "time", "value", "specified", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L210-L224
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.setLastResponse
public function setLastResponse($v) { // Because BLOB columns are streams in PDO we have to assume that they are // always modified when a new value is passed in. For example, the contents // of the stream itself may have changed externally. if (!is_resource($v) && $v !== null) { ...
php
public function setLastResponse($v) { // Because BLOB columns are streams in PDO we have to assume that they are // always modified when a new value is passed in. For example, the contents // of the stream itself may have changed externally. if (!is_resource($v) && $v !== null) { ...
[ "public", "function", "setLastResponse", "(", "$", "v", ")", "{", "// Because BLOB columns are streams in PDO we have to assume that they are", "// always modified when a new value is passed in. For example, the contents", "// of the stream itself may have changed externally.", "if", "(", ...
Set the value of [last_response] column. @param resource $v new value @return ApiLog The current object (for fluent API support)
[ "Set", "the", "value", "of", "[", "last_response", "]", "column", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L278-L294
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.hydrate
public function hydrate($row, $startcol = 0, $rehydrate = false) { try { $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; $this->dt_call = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null; $this->remote_app_id = ($row[$st...
php
public function hydrate($row, $startcol = 0, $rehydrate = false) { try { $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; $this->dt_call = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null; $this->remote_app_id = ($row[$st...
[ "public", "function", "hydrate", "(", "$", "row", ",", "$", "startcol", "=", "0", ",", "$", "rehydrate", "=", "false", ")", "{", "try", "{", "$", "this", "->", "id", "=", "(", "$", "row", "[", "$", "startcol", "+", "0", "]", "!==", "null", ")",...
Hydrates (populates) the object variables with values from the database resultset. An offset (0-based "start column") is specified so that objects can be hydrated with a subset of the columns in the resultset rows. This is needed, for example, for results of JOIN queries where the resultset row includes columns from ...
[ "Hydrates", "(", "populates", ")", "the", "object", "variables", "with", "values", "from", "the", "database", "resultset", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L324-L353
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.reload
public function reload($deep = false, PropelPDO $con = null) { if ($this->isDeleted()) { throw new PropelException("Cannot reload a deleted object."); } if ($this->isNew()) { throw new PropelException("Cannot reload an unsaved object."); } if ($con =...
php
public function reload($deep = false, PropelPDO $con = null) { if ($this->isDeleted()) { throw new PropelException("Cannot reload a deleted object."); } if ($this->isNew()) { throw new PropelException("Cannot reload an unsaved object."); } if ($con =...
[ "public", "function", "reload", "(", "$", "deep", "=", "false", ",", "PropelPDO", "$", "con", "=", "null", ")", "{", "if", "(", "$", "this", "->", "isDeleted", "(", ")", ")", "{", "throw", "new", "PropelException", "(", "\"Cannot reload a deleted object.\"...
Reloads this object from datastore based on primary key and (optionally) resets all associated objects. This will only work if the object has been saved and has a valid primary key set. @param boolean $deep (optional) Whether to also de-associated any related objects. @param PropelPDO $con (optional) The PropelPDO co...
[ "Reloads", "this", "object", "from", "datastore", "based", "on", "primary", "key", "and", "(", "optionally", ")", "resets", "all", "associated", "objects", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L386-L415
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.delete
public function delete(PropelPDO $con = null) { if ($this->isDeleted()) { throw new PropelException("This object has already been deleted."); } if ($con === null) { $con = Propel::getConnection(ApiLogPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } ...
php
public function delete(PropelPDO $con = null) { if ($this->isDeleted()) { throw new PropelException("This object has already been deleted."); } if ($con === null) { $con = Propel::getConnection(ApiLogPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } ...
[ "public", "function", "delete", "(", "PropelPDO", "$", "con", "=", "null", ")", "{", "if", "(", "$", "this", "->", "isDeleted", "(", ")", ")", "{", "throw", "new", "PropelException", "(", "\"This object has already been deleted.\"", ")", ";", "}", "if", "(...
Removes this object from datastore and sets delete attribute. @param PropelPDO $con @return void @throws PropelException @throws Exception @see BaseObject::setDeleted() @see BaseObject::isDeleted()
[ "Removes", "this", "object", "from", "datastore", "and", "sets", "delete", "attribute", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L427-L454
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.save
public function save(PropelPDO $con = null) { if ($this->isDeleted()) { throw new PropelException("You cannot save an object that has been deleted."); } if ($con === null) { $con = Propel::getConnection(ApiLogPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } ...
php
public function save(PropelPDO $con = null) { if ($this->isDeleted()) { throw new PropelException("You cannot save an object that has been deleted."); } if ($con === null) { $con = Propel::getConnection(ApiLogPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } ...
[ "public", "function", "save", "(", "PropelPDO", "$", "con", "=", "null", ")", "{", "if", "(", "$", "this", "->", "isDeleted", "(", ")", ")", "{", "throw", "new", "PropelException", "(", "\"You cannot save an object that has been deleted.\"", ")", ";", "}", "...
Persists this object to the database. If the object is new, it inserts it; otherwise an update is performed. All modified related objects will also be persisted in the doSave() method. This method wraps all precipitate database operations in a single transaction. @param PropelPDO $con @return int The num...
[ "Persists", "this", "object", "to", "the", "database", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L470-L508
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.doInsert
protected function doInsert(PropelPDO $con) { $modifiedColumns = array(); $index = 0; $this->modifiedColumns[] = ApiLogPeer::ID; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ApiLogPeer::ID . ')'); ...
php
protected function doInsert(PropelPDO $con) { $modifiedColumns = array(); $index = 0; $this->modifiedColumns[] = ApiLogPeer::ID; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ApiLogPeer::ID . ')'); ...
[ "protected", "function", "doInsert", "(", "PropelPDO", "$", "con", ")", "{", "$", "modifiedColumns", "=", "array", "(", ")", ";", "$", "index", "=", "0", ";", "$", "this", "->", "modifiedColumns", "[", "]", "=", "ApiLogPeer", "::", "ID", ";", "if", "...
Insert the row in the database. @param PropelPDO $con @throws PropelException @see doSave()
[ "Insert", "the", "row", "in", "the", "database", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L570-L641
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.doValidate
protected function doValidate($columns = null) { if (!$this->alreadyInValidation) { $this->alreadyInValidation = true; $retval = null; $failureMap = array(); // We call the validate method on the following object(s) if they // were passed to thi...
php
protected function doValidate($columns = null) { if (!$this->alreadyInValidation) { $this->alreadyInValidation = true; $retval = null; $failureMap = array(); // We call the validate method on the following object(s) if they // were passed to thi...
[ "protected", "function", "doValidate", "(", "$", "columns", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "alreadyInValidation", ")", "{", "$", "this", "->", "alreadyInValidation", "=", "true", ";", "$", "retval", "=", "null", ";", "$", "fa...
This function performs the validation work for complex object models. In addition to checking the current object, all related objects will also be validated. If all pass then <code>true</code> is returned; otherwise an aggregated array of ValidationFailed objects will be returned. @param array $columns Array of colu...
[ "This", "function", "performs", "the", "validation", "work", "for", "complex", "object", "models", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L710-L741
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.getByPosition
public function getByPosition($pos) { switch ($pos) { case 0: return $this->getId(); break; case 1: return $this->getDtCall(); break; case 2: return $this->getRemoteAppId(); br...
php
public function getByPosition($pos) { switch ($pos) { case 0: return $this->getId(); break; case 1: return $this->getDtCall(); break; case 2: return $this->getRemoteAppId(); br...
[ "public", "function", "getByPosition", "(", "$", "pos", ")", "{", "switch", "(", "$", "pos", ")", "{", "case", "0", ":", "return", "$", "this", "->", "getId", "(", ")", ";", "break", ";", "case", "1", ":", "return", "$", "this", "->", "getDtCall", ...
Retrieves a field from the object by Position as specified in the xml schema. Zero-based. @param int $pos position in xml schema @return mixed Value of field at $pos
[ "Retrieves", "a", "field", "from", "the", "object", "by", "Position", "as", "specified", "in", "the", "xml", "schema", ".", "Zero", "-", "based", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L768-L790
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.toArray
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) { if (isset($alreadyDumpedObjects['ApiLog'][$this->getPrimaryKey()])) { return '*RECURSION*'; } $alreadyDumpedObjects['ApiLo...
php
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) { if (isset($alreadyDumpedObjects['ApiLog'][$this->getPrimaryKey()])) { return '*RECURSION*'; } $alreadyDumpedObjects['ApiLo...
[ "public", "function", "toArray", "(", "$", "keyType", "=", "BasePeer", "::", "TYPE_PHPNAME", ",", "$", "includeLazyLoadColumns", "=", "true", ",", "$", "alreadyDumpedObjects", "=", "array", "(", ")", ",", "$", "includeForeignObjects", "=", "false", ")", "{", ...
Exports the object as an array. You can specify the key type of the array by passing one of the class type constants. @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. Defau...
[ "Exports", "the", "object", "as", "an", "array", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L807-L833
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.setByPosition
public function setByPosition($pos, $value) { switch ($pos) { case 0: $this->setId($value); break; case 1: $this->setDtCall($value); break; case 2: $this->setRemoteAppId($value); ...
php
public function setByPosition($pos, $value) { switch ($pos) { case 0: $this->setId($value); break; case 1: $this->setDtCall($value); break; case 2: $this->setRemoteAppId($value); ...
[ "public", "function", "setByPosition", "(", "$", "pos", ",", "$", "value", ")", "{", "switch", "(", "$", "pos", ")", "{", "case", "0", ":", "$", "this", "->", "setId", "(", "$", "value", ")", ";", "break", ";", "case", "1", ":", "$", "this", "-...
Sets a field from the object by Position as specified in the xml schema. Zero-based. @param int $pos position in xml schema @param mixed $value field value @return void
[ "Sets", "a", "field", "from", "the", "object", "by", "Position", "as", "specified", "in", "the", "xml", "schema", ".", "Zero", "-", "based", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L861-L880
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.fromArray
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = ApiLogPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); if (array_key_exists($keys[1], $arr)) $this->setDtCall($arr[$keys[1]]); if (array_key_exists($keys[2]...
php
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = ApiLogPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); if (array_key_exists($keys[1], $arr)) $this->setDtCall($arr[$keys[1]]); if (array_key_exists($keys[2]...
[ "public", "function", "fromArray", "(", "$", "arr", ",", "$", "keyType", "=", "BasePeer", "::", "TYPE_PHPNAME", ")", "{", "$", "keys", "=", "ApiLogPeer", "::", "getFieldNames", "(", "$", "keyType", ")", ";", "if", "(", "array_key_exists", "(", "$", "keys...
Populates the object using an array. This is particularly useful when populating an object from one of the request arrays (e.g. $_POST). This method goes through the column names, checking to see whether a matching key exists in populated array. If so the setByName() method is called for that column. You can specify...
[ "Populates", "the", "object", "using", "an", "array", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L899-L908
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.buildCriteria
public function buildCriteria() { $criteria = new Criteria(ApiLogPeer::DATABASE_NAME); if ($this->isColumnModified(ApiLogPeer::ID)) $criteria->add(ApiLogPeer::ID, $this->id); if ($this->isColumnModified(ApiLogPeer::DT_CALL)) $criteria->add(ApiLogPeer::DT_CALL, $this->dt_call); if ($...
php
public function buildCriteria() { $criteria = new Criteria(ApiLogPeer::DATABASE_NAME); if ($this->isColumnModified(ApiLogPeer::ID)) $criteria->add(ApiLogPeer::ID, $this->id); if ($this->isColumnModified(ApiLogPeer::DT_CALL)) $criteria->add(ApiLogPeer::DT_CALL, $this->dt_call); if ($...
[ "public", "function", "buildCriteria", "(", ")", "{", "$", "criteria", "=", "new", "Criteria", "(", "ApiLogPeer", "::", "DATABASE_NAME", ")", ";", "if", "(", "$", "this", "->", "isColumnModified", "(", "ApiLogPeer", "::", "ID", ")", ")", "$", "criteria", ...
Build a Criteria object containing the values of all modified columns in this object. @return Criteria The Criteria object containing all modified values.
[ "Build", "a", "Criteria", "object", "containing", "the", "values", "of", "all", "modified", "columns", "in", "this", "object", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L915-L926
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.copyInto
public function copyInto($copyObj, $deepCopy = false, $makeNew = true) { $copyObj->setDtCall($this->getDtCall()); $copyObj->setRemoteAppId($this->getRemoteAppId()); $copyObj->setStatuscode($this->getStatuscode()); $copyObj->setLastResponse($this->getLastResponse()); if ($dee...
php
public function copyInto($copyObj, $deepCopy = false, $makeNew = true) { $copyObj->setDtCall($this->getDtCall()); $copyObj->setRemoteAppId($this->getRemoteAppId()); $copyObj->setStatuscode($this->getStatuscode()); $copyObj->setLastResponse($this->getLastResponse()); if ($dee...
[ "public", "function", "copyInto", "(", "$", "copyObj", ",", "$", "deepCopy", "=", "false", ",", "$", "makeNew", "=", "true", ")", "{", "$", "copyObj", "->", "setDtCall", "(", "$", "this", "->", "getDtCall", "(", ")", ")", ";", "$", "copyObj", "->", ...
Sets contents of passed object to values from current object. If desired, this method can also make copies of all associated (fkey referrers) objects. @param object $copyObj An object of ApiLog (or compatible) type. @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. @param...
[ "Sets", "contents", "of", "passed", "object", "to", "values", "from", "current", "object", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L985-L1007
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.setRemoteApp
public function setRemoteApp(RemoteApp $v = null) { if ($v === null) { $this->setRemoteAppId(NULL); } else { $this->setRemoteAppId($v->getId()); } $this->aRemoteApp = $v; // Add binding for other direction of this n:n relationship. // If this...
php
public function setRemoteApp(RemoteApp $v = null) { if ($v === null) { $this->setRemoteAppId(NULL); } else { $this->setRemoteAppId($v->getId()); } $this->aRemoteApp = $v; // Add binding for other direction of this n:n relationship. // If this...
[ "public", "function", "setRemoteApp", "(", "RemoteApp", "$", "v", "=", "null", ")", "{", "if", "(", "$", "v", "===", "null", ")", "{", "$", "this", "->", "setRemoteAppId", "(", "NULL", ")", ";", "}", "else", "{", "$", "this", "->", "setRemoteAppId", ...
Declares an association between this object and a RemoteApp object. @param RemoteApp $v @return ApiLog The current object (for fluent API support) @throws PropelException
[ "Declares", "an", "association", "between", "this", "object", "and", "a", "RemoteApp", "object", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L1056-L1074
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.getRemoteApp
public function getRemoteApp(PropelPDO $con = null, $doQuery = true) { if ($this->aRemoteApp === null && ($this->remote_app_id !== null) && $doQuery) { $this->aRemoteApp = RemoteAppQuery::create()->findPk($this->remote_app_id, $con); /* The following can be used additionally to ...
php
public function getRemoteApp(PropelPDO $con = null, $doQuery = true) { if ($this->aRemoteApp === null && ($this->remote_app_id !== null) && $doQuery) { $this->aRemoteApp = RemoteAppQuery::create()->findPk($this->remote_app_id, $con); /* The following can be used additionally to ...
[ "public", "function", "getRemoteApp", "(", "PropelPDO", "$", "con", "=", "null", ",", "$", "doQuery", "=", "true", ")", "{", "if", "(", "$", "this", "->", "aRemoteApp", "===", "null", "&&", "(", "$", "this", "->", "remote_app_id", "!==", "null", ")", ...
Get the associated RemoteApp object @param PropelPDO $con Optional Connection object. @param $doQuery Executes a query to get the object if required @return RemoteApp The associated RemoteApp object. @throws PropelException
[ "Get", "the", "associated", "RemoteApp", "object" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L1085-L1099
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseApiLog.php
BaseApiLog.clear
public function clear() { $this->id = null; $this->dt_call = null; $this->remote_app_id = null; $this->statuscode = null; $this->last_response = null; $this->alreadyInSave = false; $this->alreadyInValidation = false; $this->alreadyInClearAllReferencesD...
php
public function clear() { $this->id = null; $this->dt_call = null; $this->remote_app_id = null; $this->statuscode = null; $this->last_response = null; $this->alreadyInSave = false; $this->alreadyInValidation = false; $this->alreadyInClearAllReferencesD...
[ "public", "function", "clear", "(", ")", "{", "$", "this", "->", "id", "=", "null", ";", "$", "this", "->", "dt_call", "=", "null", ";", "$", "this", "->", "remote_app_id", "=", "null", ";", "$", "this", "->", "statuscode", "=", "null", ";", "$", ...
Clears the current object and sets all attributes to their default values
[ "Clears", "the", "current", "object", "and", "sets", "all", "attributes", "to", "their", "default", "values" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLog.php#L1104-L1118
PeekAndPoke/psi
src/Operation/FullSet/UserKeySortOperation.php
UserKeySortOperation.apply
public function apply(\Iterator $set) { $data = iterator_to_array($set); uksort($data, $this->function); return new \ArrayIterator($data); }
php
public function apply(\Iterator $set) { $data = iterator_to_array($set); uksort($data, $this->function); return new \ArrayIterator($data); }
[ "public", "function", "apply", "(", "\\", "Iterator", "$", "set", ")", "{", "$", "data", "=", "iterator_to_array", "(", "$", "set", ")", ";", "uksort", "(", "$", "data", ",", "$", "this", "->", "function", ")", ";", "return", "new", "\\", "ArrayItera...
{@inheritdoc}
[ "{" ]
train
https://github.com/PeekAndPoke/psi/blob/cfd45d995d3a2c2ea6ba5b1ce7b5fcc71179456f/src/Operation/FullSet/UserKeySortOperation.php#L23-L30
krzysztofmazur/php-object-mapper
src/KrzysztofMazur/ObjectMapper/Util/PropertyNameConverter.php
PropertyNameConverter.getPropertyName
public function getPropertyName($methodName) { $this->checkMethodName($methodName); return lcfirst($this->removeAllPrefixes(self::ACCESSOR_PREFIXES, $methodName)); }
php
public function getPropertyName($methodName) { $this->checkMethodName($methodName); return lcfirst($this->removeAllPrefixes(self::ACCESSOR_PREFIXES, $methodName)); }
[ "public", "function", "getPropertyName", "(", "$", "methodName", ")", "{", "$", "this", "->", "checkMethodName", "(", "$", "methodName", ")", ";", "return", "lcfirst", "(", "$", "this", "->", "removeAllPrefixes", "(", "self", "::", "ACCESSOR_PREFIXES", ",", ...
{@inheritdoc}
[ "{" ]
train
https://github.com/krzysztofmazur/php-object-mapper/blob/2c22acad9634cfe8e9a75d72e665d450ada8d4e3/src/KrzysztofMazur/ObjectMapper/Util/PropertyNameConverter.php#L21-L26
krzysztofmazur/php-object-mapper
src/KrzysztofMazur/ObjectMapper/Util/PropertyNameConverter.php
PropertyNameConverter.getGetterName
public function getGetterName($propertyName, $boolean = false) { $this->checkPropertyName($propertyName); return sprintf("%s%s", $boolean ? 'is' : 'get', ucfirst($propertyName)); }
php
public function getGetterName($propertyName, $boolean = false) { $this->checkPropertyName($propertyName); return sprintf("%s%s", $boolean ? 'is' : 'get', ucfirst($propertyName)); }
[ "public", "function", "getGetterName", "(", "$", "propertyName", ",", "$", "boolean", "=", "false", ")", "{", "$", "this", "->", "checkPropertyName", "(", "$", "propertyName", ")", ";", "return", "sprintf", "(", "\"%s%s\"", ",", "$", "boolean", "?", "'is'"...
{@inheritdoc}
[ "{" ]
train
https://github.com/krzysztofmazur/php-object-mapper/blob/2c22acad9634cfe8e9a75d72e665d450ada8d4e3/src/KrzysztofMazur/ObjectMapper/Util/PropertyNameConverter.php#L31-L36
apioo/psx-sandbox
src/Parser.php
Parser.parse
public function parse($code) { $parser = $this->parserFactory->create($this->parserType); try { $ast = $parser->parse($code); } catch (Error $error) { throw new ParseException($error->getMessage(), 0, $error); } $printer = new Printer($this->security...
php
public function parse($code) { $parser = $this->parserFactory->create($this->parserType); try { $ast = $parser->parse($code); } catch (Error $error) { throw new ParseException($error->getMessage(), 0, $error); } $printer = new Printer($this->security...
[ "public", "function", "parse", "(", "$", "code", ")", "{", "$", "parser", "=", "$", "this", "->", "parserFactory", "->", "create", "(", "$", "this", "->", "parserType", ")", ";", "try", "{", "$", "ast", "=", "$", "parser", "->", "parse", "(", "$", ...
Parses untrusted PHP code and returns a secure version which only contains safe calls. Throws an exception in case the code contains untrusted calls @throws \PSX\Sandbox\SecurityException @throws \PSX\Sandbox\ParseException @param string $code @return string
[ "Parses", "untrusted", "PHP", "code", "and", "returns", "a", "secure", "version", "which", "only", "contains", "safe", "calls", ".", "Throws", "an", "exception", "in", "case", "the", "code", "contains", "untrusted", "calls" ]
train
https://github.com/apioo/psx-sandbox/blob/5d136a398da375056e6526bbbc85d7f5d3df9441/src/Parser.php#L67-L79
djgadd/themosis-illuminate
src/Mail/Transport/WpMailTransport.php
WpMailTransport.send
public function send(Swift_Mime_Message $msg, &$failedRecipients = null) { $this->beforeSendPerformed($msg); // Send the message using wp_mail if (wp_mail(array_keys($msg->getTo()), $msg->getSubject(), $msg->toString(), $msg->getHeaders()->toString(), [])) { $this->sendPerformed($msg); } r...
php
public function send(Swift_Mime_Message $msg, &$failedRecipients = null) { $this->beforeSendPerformed($msg); // Send the message using wp_mail if (wp_mail(array_keys($msg->getTo()), $msg->getSubject(), $msg->toString(), $msg->getHeaders()->toString(), [])) { $this->sendPerformed($msg); } r...
[ "public", "function", "send", "(", "Swift_Mime_Message", "$", "msg", ",", "&", "$", "failedRecipients", "=", "null", ")", "{", "$", "this", "->", "beforeSendPerformed", "(", "$", "msg", ")", ";", "// Send the message using wp_mail", "if", "(", "wp_mail", "(", ...
Send the given Message. Recipient/sender data will be retrieved from the Message API. The return value is the number of recipients who were accepted for delivery. @param Swift_Mime_Message $msg @param string[] $failedRecipients An array of failures by-reference @return int
[ "Send", "the", "given", "Message", "." ]
train
https://github.com/djgadd/themosis-illuminate/blob/13ee4c3413cddd85a2f262ac361f35c81da0c53c/src/Mail/Transport/WpMailTransport.php#L21-L31
fubhy/graphql-php
src/Language/Lexer.php
Lexer.positionAfterWhitespace
protected function positionAfterWhitespace($start) { $position = $start; $length = $this->source->getLength(); while ($start < $length) { $code = $this->charCodeAt($position); // Skip whitespace. if ( $code === 32 || // space ...
php
protected function positionAfterWhitespace($start) { $position = $start; $length = $this->source->getLength(); while ($start < $length) { $code = $this->charCodeAt($position); // Skip whitespace. if ( $code === 32 || // space ...
[ "protected", "function", "positionAfterWhitespace", "(", "$", "start", ")", "{", "$", "position", "=", "$", "start", ";", "$", "length", "=", "$", "this", "->", "source", "->", "getLength", "(", ")", ";", "while", "(", "$", "start", "<", "$", "length",...
Reads from body starting at startPosition until it finds a non-whitespace or commented character, then returns the position of that character for lexing. @param int $start @return int
[ "Reads", "from", "body", "starting", "at", "startPosition", "until", "it", "finds", "a", "non", "-", "whitespace", "or", "commented", "character", "then", "returns", "the", "position", "of", "that", "character", "for", "lexing", "." ]
train
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Lexer.php#L28-L63
fubhy/graphql-php
src/Language/Lexer.php
Lexer.readToken
public function readToken($start) { $length = $this->source->getLength(); $position = $this->positionAfterWhitespace($start); if ($position >= $length) { return new Token(Token::EOF_TYPE, $length, $length); } $code = $this->charCodeAt($position); switch...
php
public function readToken($start) { $length = $this->source->getLength(); $position = $this->positionAfterWhitespace($start); if ($position >= $length) { return new Token(Token::EOF_TYPE, $length, $length); } $code = $this->charCodeAt($position); switch...
[ "public", "function", "readToken", "(", "$", "start", ")", "{", "$", "length", "=", "$", "this", "->", "source", "->", "getLength", "(", ")", ";", "$", "position", "=", "$", "this", "->", "positionAfterWhitespace", "(", "$", "start", ")", ";", "if", ...
@param int $start @return \Fubhy\GraphQL\Language\Token @throws \Exception
[ "@param", "int", "$start" ]
train
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Lexer.php#L72-L152
fubhy/graphql-php
src/Language/Lexer.php
Lexer.readNumber
protected function readNumber($start, $code) { $position = $start; $type = Token::INT_TYPE; if ($code === 45) { // - $code = $this->charCodeAt(++$position); } if ($code === 48) { // 0 $code = $this->charCodeAt(++$position); } elseif ($code >=...
php
protected function readNumber($start, $code) { $position = $start; $type = Token::INT_TYPE; if ($code === 45) { // - $code = $this->charCodeAt(++$position); } if ($code === 48) { // 0 $code = $this->charCodeAt(++$position); } elseif ($code >=...
[ "protected", "function", "readNumber", "(", "$", "start", ",", "$", "code", ")", "{", "$", "position", "=", "$", "start", ";", "$", "type", "=", "Token", "::", "INT_TYPE", ";", "if", "(", "$", "code", "===", "45", ")", "{", "// -", "$", "code", "...
Reads a number token from the source file, either a float or an int depending on whether a decimal point appears. Int: -?(0|[1-9][0-9]*) Float: -?(0|[1-9][0-9]*)\.[0-9]+(e-?[0-9]+)? @param int $start @param int $code @return \Fubhy\GraphQL\Language\Token @throws \Exception
[ "Reads", "a", "number", "token", "from", "the", "source", "file", "either", "a", "float", "or", "an", "int", "depending", "on", "whether", "a", "decimal", "point", "appears", "." ]
train
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Lexer.php#L168-L220
fubhy/graphql-php
src/Language/Lexer.php
Lexer.readString
protected function readString($start) { $position = $start + 1; $chunk = $position; $length = $this->source->getLength(); $body = $this->source->getBody(); $code = NULL; $value = ''; while ( $position < $length && ($code = $this->charC...
php
protected function readString($start) { $position = $start + 1; $chunk = $position; $length = $this->source->getLength(); $body = $this->source->getBody(); $code = NULL; $value = ''; while ( $position < $length && ($code = $this->charC...
[ "protected", "function", "readString", "(", "$", "start", ")", "{", "$", "position", "=", "$", "start", "+", "1", ";", "$", "chunk", "=", "$", "position", ";", "$", "length", "=", "$", "this", "->", "source", "->", "getLength", "(", ")", ";", "$", ...
@param int $start @return \Fubhy\GraphQL\Language\Token @throws \Exception
[ "@param", "int", "$start" ]
train
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Lexer.php#L229-L308
fubhy/graphql-php
src/Language/Lexer.php
Lexer.readName
protected function readName($position) { $end = $position + 1; $length = $this->source->getLength(); $body = $this->source->getBody(); while ( $end < $length && ($code = $this->charCodeAt($end)) && ( $code === 95 || // _ ...
php
protected function readName($position) { $end = $position + 1; $length = $this->source->getLength(); $body = $this->source->getBody(); while ( $end < $length && ($code = $this->charCodeAt($end)) && ( $code === 95 || // _ ...
[ "protected", "function", "readName", "(", "$", "position", ")", "{", "$", "end", "=", "$", "position", "+", "1", ";", "$", "length", "=", "$", "this", "->", "source", "->", "getLength", "(", ")", ";", "$", "body", "=", "$", "this", "->", "source", ...
Reads an alphanumeric + underscore name from the source. [_A-Za-z][_0-9A-Za-z]* @param int $position @return \Fubhy\GraphQL\Language\Token
[ "Reads", "an", "alphanumeric", "+", "underscore", "name", "from", "the", "source", "." ]
train
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Lexer.php#L319-L340
fubhy/graphql-php
src/Language/Lexer.php
Lexer.charCodeAt
protected function charCodeAt($index) { $body = $this->source->getBody(); $char = mb_substr($body, $index, 1, 'UTF-8'); if (mb_check_encoding($char, 'UTF-8')) { return hexdec(bin2hex(mb_convert_encoding($char, 'UTF-32BE', 'UTF-8'))); } else { return NULL; ...
php
protected function charCodeAt($index) { $body = $this->source->getBody(); $char = mb_substr($body, $index, 1, 'UTF-8'); if (mb_check_encoding($char, 'UTF-8')) { return hexdec(bin2hex(mb_convert_encoding($char, 'UTF-32BE', 'UTF-8'))); } else { return NULL; ...
[ "protected", "function", "charCodeAt", "(", "$", "index", ")", "{", "$", "body", "=", "$", "this", "->", "source", "->", "getBody", "(", ")", ";", "$", "char", "=", "mb_substr", "(", "$", "body", ",", "$", "index", ",", "1", ",", "'UTF-8'", ")", ...
Implementation of JavaScript's String.prototype.charCodeAt function. @param int $index @return null|number
[ "Implementation", "of", "JavaScript", "s", "String", ".", "prototype", ".", "charCodeAt", "function", "." ]
train
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Lexer.php#L349-L359
fubhy/graphql-php
src/Language/Lexer.php
Lexer.uniCharCode
protected function uniCharCode($a, $b, $c, $d) { return $this->char2hex($a) << 12 | $this->char2hex($b) << 8 | $this->char2hex($c) << 4 | $this->char2hex($d); }
php
protected function uniCharCode($a, $b, $c, $d) { return $this->char2hex($a) << 12 | $this->char2hex($b) << 8 | $this->char2hex($c) << 4 | $this->char2hex($d); }
[ "protected", "function", "uniCharCode", "(", "$", "a", ",", "$", "b", ",", "$", "c", ",", "$", "d", ")", "{", "return", "$", "this", "->", "char2hex", "(", "$", "a", ")", "<<", "12", "|", "$", "this", "->", "char2hex", "(", "$", "b", ")", "<<...
Converts four hexadecimal chars to the integer that the string represents. For example, uniCharCode('0','0','0','f') will return 15, and uniCharCode('0','0','f','f') returns 255. Returns a negative number on error, if a char was invalid. This is implemented by noting that char2hex() returns -1 on error, which means t...
[ "Converts", "four", "hexadecimal", "chars", "to", "the", "integer", "that", "the", "string", "represents", ".", "For", "example", "uniCharCode", "(", "0", "0", "0", "f", ")", "will", "return", "15", "and", "uniCharCode", "(", "0", "0", "f", "f", ")", "...
train
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Lexer.php#L391-L394
fubhy/graphql-php
src/Language/Lexer.php
Lexer.char2hex
protected function char2hex($a) { return $a >= 48 && $a <= 57 ? $a - 48 : // 0-9 ($a >= 65 && $a <= 70 ? $a - 55 : // A-F ($a >= 97 && $a <= 102 ? $a - 87 : -1)); // a-f }
php
protected function char2hex($a) { return $a >= 48 && $a <= 57 ? $a - 48 : // 0-9 ($a >= 65 && $a <= 70 ? $a - 55 : // A-F ($a >= 97 && $a <= 102 ? $a - 87 : -1)); // a-f }
[ "protected", "function", "char2hex", "(", "$", "a", ")", "{", "return", "$", "a", ">=", "48", "&&", "$", "a", "<=", "57", "?", "$", "a", "-", "48", ":", "// 0-9", "(", "$", "a", ">=", "65", "&&", "$", "a", "<=", "70", "?", "$", "a", "-", ...
Converts a hex character to its integer value. '0' becomes 0, '9' becomes 9 'A' becomes 10, 'F' becomes 15 'a' becomes 10, 'f' becomes 15 Returns -1 on error. @param $a @return int
[ "Converts", "a", "hex", "character", "to", "its", "integer", "value", ".", "0", "becomes", "0", "9", "becomes", "9", "A", "becomes", "10", "F", "becomes", "15", "a", "becomes", "10", "f", "becomes", "15" ]
train
https://github.com/fubhy/graphql-php/blob/c1de2233c731ca29e5c5db4c43f3b9db36478c83/src/Language/Lexer.php#L408-L414
xicrow/php-debug
src/Timer.php
Timer.output
public static function output($data) { if (!self::$output || !is_string($data)) { return; } if (php_sapi_name() != 'cli') { echo sprintf(self::$style['called_from_format'], Debugger::getCalledFrom(2)); echo sprintf(self::$style['output_format'], $data); ...
php
public static function output($data) { if (!self::$output || !is_string($data)) { return; } if (php_sapi_name() != 'cli') { echo sprintf(self::$style['called_from_format'], Debugger::getCalledFrom(2)); echo sprintf(self::$style['output_format'], $data); ...
[ "public", "static", "function", "output", "(", "$", "data", ")", "{", "if", "(", "!", "self", "::", "$", "output", "||", "!", "is_string", "(", "$", "data", ")", ")", "{", "return", ";", "}", "if", "(", "php_sapi_name", "(", ")", "!=", "'cli'", "...
@param string $data @codeCoverageIgnore
[ "@param", "string", "$data" ]
train
https://github.com/xicrow/php-debug/blob/b027be3249c0ce1a2a8d8ef50a05cd5805eaf45a/src/Timer.php#L59-L74
xicrow/php-debug
src/Timer.php
Timer.add
public static function add($key = null, $data = []) { // If no key is given if (is_null($key)) { // Set key to file and line $key = Debugger::getCalledFrom(2); } // If key is allready in use if (isset(self::$collection[$key])) { // Get ori...
php
public static function add($key = null, $data = []) { // If no key is given if (is_null($key)) { // Set key to file and line $key = Debugger::getCalledFrom(2); } // If key is allready in use if (isset(self::$collection[$key])) { // Get ori...
[ "public", "static", "function", "add", "(", "$", "key", "=", "null", ",", "$", "data", "=", "[", "]", ")", "{", "// If no key is given", "if", "(", "is_null", "(", "$", "key", ")", ")", "{", "// Set key to file and line", "$", "key", "=", "Debugger", "...
@param string|null $key @param array $data @return string
[ "@param", "string|null", "$key", "@param", "array", "$data" ]
train
https://github.com/xicrow/php-debug/blob/b027be3249c0ce1a2a8d8ef50a05cd5805eaf45a/src/Timer.php#L92-L142
xicrow/php-debug
src/Timer.php
Timer.start
public static function start($key = null) { // Add new item $key = self::add($key, [ 'start' => microtime(true), ]); // Set current item self::$currentItem = $key; // Add to running items self::$runningItems[$key] = true; return $key; ...
php
public static function start($key = null) { // Add new item $key = self::add($key, [ 'start' => microtime(true), ]); // Set current item self::$currentItem = $key; // Add to running items self::$runningItems[$key] = true; return $key; ...
[ "public", "static", "function", "start", "(", "$", "key", "=", "null", ")", "{", "// Add new item", "$", "key", "=", "self", "::", "add", "(", "$", "key", ",", "[", "'start'", "=>", "microtime", "(", "true", ")", ",", "]", ")", ";", "// Set current i...
@param string|null $key @return string
[ "@param", "string|null", "$key" ]
train
https://github.com/xicrow/php-debug/blob/b027be3249c0ce1a2a8d8ef50a05cd5805eaf45a/src/Timer.php#L149-L163
xicrow/php-debug
src/Timer.php
Timer.stop
public static function stop($key = null) { // If no key is given if (is_null($key)) { // Get key of the last started item end(self::$runningItems); $key = key(self::$runningItems); } // Check for key duplicates, and find the last one not stopped ...
php
public static function stop($key = null) { // If no key is given if (is_null($key)) { // Get key of the last started item end(self::$runningItems); $key = key(self::$runningItems); } // Check for key duplicates, and find the last one not stopped ...
[ "public", "static", "function", "stop", "(", "$", "key", "=", "null", ")", "{", "// If no key is given", "if", "(", "is_null", "(", "$", "key", ")", ")", "{", "// Get key of the last started item", "end", "(", "self", "::", "$", "runningItems", ")", ";", "...
@param string|null $key @return string
[ "@param", "string|null", "$key" ]
train
https://github.com/xicrow/php-debug/blob/b027be3249c0ce1a2a8d8ef50a05cd5805eaf45a/src/Timer.php#L170-L211
xicrow/php-debug
src/Timer.php
Timer.custom
public static function custom($key = null, $start = null, $stop = null) { // Add new item self::add($key, [ 'start' => $start, 'stop' => $stop, ]); // If no stop value is given if (is_null($stop)) { // Set current item self::$...
php
public static function custom($key = null, $start = null, $stop = null) { // Add new item self::add($key, [ 'start' => $start, 'stop' => $stop, ]); // If no stop value is given if (is_null($stop)) { // Set current item self::$...
[ "public", "static", "function", "custom", "(", "$", "key", "=", "null", ",", "$", "start", "=", "null", ",", "$", "stop", "=", "null", ")", "{", "// Add new item", "self", "::", "add", "(", "$", "key", ",", "[", "'start'", "=>", "$", "start", ",", ...
@param string|null $key @param int|float|null $start @param int|float|null $stop @return string
[ "@param", "string|null", "$key", "@param", "int|float|null", "$start", "@param", "int|float|null", "$stop" ]
train
https://github.com/xicrow/php-debug/blob/b027be3249c0ce1a2a8d8ef50a05cd5805eaf45a/src/Timer.php#L220-L238
xicrow/php-debug
src/Timer.php
Timer.callback
public static function callback($key = null, $callback) { // Get parameters for callback $callbackParams = func_get_args(); unset($callbackParams[0], $callbackParams[1]); $callbackParams = array_values($callbackParams); // Get key if no key is given if (is_null($key)...
php
public static function callback($key = null, $callback) { // Get parameters for callback $callbackParams = func_get_args(); unset($callbackParams[0], $callbackParams[1]); $callbackParams = array_values($callbackParams); // Get key if no key is given if (is_null($key)...
[ "public", "static", "function", "callback", "(", "$", "key", "=", "null", ",", "$", "callback", ")", "{", "// Get parameters for callback", "$", "callbackParams", "=", "func_get_args", "(", ")", ";", "unset", "(", "$", "callbackParams", "[", "0", "]", ",", ...
@param string|null $key @param string|array|\Closure $callback @return mixed
[ "@param", "string|null", "$key", "@param", "string|array|", "\\", "Closure", "$callback" ]
train
https://github.com/xicrow/php-debug/blob/b027be3249c0ce1a2a8d8ef50a05cd5805eaf45a/src/Timer.php#L246-L326
xicrow/php-debug
src/Timer.php
Timer.show
public static function show($key = null, $options = []) { $output = self::getStats($key, $options); if (!empty($output)) { self::output($output); } }
php
public static function show($key = null, $options = []) { $output = self::getStats($key, $options); if (!empty($output)) { self::output($output); } }
[ "public", "static", "function", "show", "(", "$", "key", "=", "null", ",", "$", "options", "=", "[", "]", ")", "{", "$", "output", "=", "self", "::", "getStats", "(", "$", "key", ",", "$", "options", ")", ";", "if", "(", "!", "empty", "(", "$",...
@param string|null $key @param array $options @codeCoverageIgnore
[ "@param", "string|null", "$key", "@param", "array", "$options" ]
train
https://github.com/xicrow/php-debug/blob/b027be3249c0ce1a2a8d8ef50a05cd5805eaf45a/src/Timer.php#L334-L341
xicrow/php-debug
src/Timer.php
Timer.showAll
public static function showAll($options = []) { // Stop started items if (count(self::$runningItems)) { foreach (self::$runningItems as $key => $value) { self::stop($key); } } // Output items $output = ''; $itemCount = 1; ...
php
public static function showAll($options = []) { // Stop started items if (count(self::$runningItems)) { foreach (self::$runningItems as $key => $value) { self::stop($key); } } // Output items $output = ''; $itemCount = 1; ...
[ "public", "static", "function", "showAll", "(", "$", "options", "=", "[", "]", ")", "{", "// Stop started items", "if", "(", "count", "(", "self", "::", "$", "runningItems", ")", ")", "{", "foreach", "(", "self", "::", "$", "runningItems", "as", "$", "...
@param array $options @codeCoverageIgnore
[ "@param", "array", "$options" ]
train
https://github.com/xicrow/php-debug/blob/b027be3249c0ce1a2a8d8ef50a05cd5805eaf45a/src/Timer.php#L348-L378
xicrow/php-debug
src/Timer.php
Timer.getStats
public static function getStats($key, $options = []) { // Merge options with default options $options = array_merge([ // Show nested (boolean) 'nested' => true, // Prefix for nested items (string) 'nested_prefix' => '|-- ', // Max ...
php
public static function getStats($key, $options = []) { // Merge options with default options $options = array_merge([ // Show nested (boolean) 'nested' => true, // Prefix for nested items (string) 'nested_prefix' => '|-- ', // Max ...
[ "public", "static", "function", "getStats", "(", "$", "key", ",", "$", "options", "=", "[", "]", ")", "{", "// Merge options with default options", "$", "options", "=", "array_merge", "(", "[", "// Show nested (boolean)", "'nested'", "=>", "true", ",", "// Prefi...
@param string|null $key @param array $options @return string
[ "@param", "string|null", "$key", "@param", "array", "$options" ]
train
https://github.com/xicrow/php-debug/blob/b027be3249c0ce1a2a8d8ef50a05cd5805eaf45a/src/Timer.php#L386-L440
xicrow/php-debug
src/Timer.php
Timer.formatMiliseconds
public static function formatMiliseconds($number = 0, $precision = 2, $forceUnit = null) { $units = [ 'MS' => 1, 'S' => 1000, 'M' => 60, 'H' => 60, 'D' => 24, 'W' => 7, ]; if (is_null($forceUnit)) { $fo...
php
public static function formatMiliseconds($number = 0, $precision = 2, $forceUnit = null) { $units = [ 'MS' => 1, 'S' => 1000, 'M' => 60, 'H' => 60, 'D' => 24, 'W' => 7, ]; if (is_null($forceUnit)) { $fo...
[ "public", "static", "function", "formatMiliseconds", "(", "$", "number", "=", "0", ",", "$", "precision", "=", "2", ",", "$", "forceUnit", "=", "null", ")", "{", "$", "units", "=", "[", "'MS'", "=>", "1", ",", "'S'", "=>", "1000", ",", "'M'", "=>",...
@param int|float $number @param int $precision @param null|string $forceUnit @return string
[ "@param", "int|float", "$number", "@param", "int", "$precision", "@param", "null|string", "$forceUnit" ]
train
https://github.com/xicrow/php-debug/blob/b027be3249c0ce1a2a8d8ef50a05cd5805eaf45a/src/Timer.php#L449-L486
nikolaposa/disqus-helper
src/Disqus.php
Disqus.create
public static function create( string $shortName, WidgetLocatorInterface $widgetLocator = null ) : Disqus { $disqusHelper = new self(); $disqusHelper->shortName = $shortName; $disqusHelper->widgetLocator = $widgetLocator ?? WidgetManager::createWithDefaultWidgets(); ...
php
public static function create( string $shortName, WidgetLocatorInterface $widgetLocator = null ) : Disqus { $disqusHelper = new self(); $disqusHelper->shortName = $shortName; $disqusHelper->widgetLocator = $widgetLocator ?? WidgetManager::createWithDefaultWidgets(); ...
[ "public", "static", "function", "create", "(", "string", "$", "shortName", ",", "WidgetLocatorInterface", "$", "widgetLocator", "=", "null", ")", ":", "Disqus", "{", "$", "disqusHelper", "=", "new", "self", "(", ")", ";", "$", "disqusHelper", "->", "shortNam...
@param string $shortName Unique identifier of some Disqus website. @param WidgetLocatorInterface $widgetLocator OPTIONAL @return Disqus
[ "@param", "string", "$shortName", "Unique", "identifier", "of", "some", "Disqus", "website", ".", "@param", "WidgetLocatorInterface", "$widgetLocator", "OPTIONAL" ]
train
https://github.com/nikolaposa/disqus-helper/blob/1e224aa84c00c4c87bff9eef4e33ad01c6f60704/src/Disqus.php#L51-L64
webforge-labs/psc-cms
lib/Psc/CMS/EntityGridPanel.php
EntityGridPanel.addProperty
public function addProperty($propertyName, $flags = 0x000000, Closure $htmlConverter = NULL) { $property = $this->entityMeta->getPropertyMeta($propertyName, $this->labeler); if ($flags & self::TCI_BUTTON) { $entityMeta = $this->entityMeta; return $this->createColumn($property->getName(),...
php
public function addProperty($propertyName, $flags = 0x000000, Closure $htmlConverter = NULL) { $property = $this->entityMeta->getPropertyMeta($propertyName, $this->labeler); if ($flags & self::TCI_BUTTON) { $entityMeta = $this->entityMeta; return $this->createColumn($property->getName(),...
[ "public", "function", "addProperty", "(", "$", "propertyName", ",", "$", "flags", "=", "0x000000", ",", "Closure", "$", "htmlConverter", "=", "NULL", ")", "{", "$", "property", "=", "$", "this", "->", "entityMeta", "->", "getPropertyMeta", "(", "$", "prope...
Fügt ein Property des Entities als Spalte dem Grid hinzu flags: TCI_BUTTON stellt den Inhalt des Properties in einen Button dar, der das Entity als Button repräsentiert. wenn mit dem Grid Tabs geöffnet werden sollen, muss mindestens ein Property ein TCI_BUTTON flag haben @param bitmap $flags @param Closure $htmlConve...
[ "Fügt", "ein", "Property", "des", "Entities", "als", "Spalte", "dem", "Grid", "hinzu" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/CMS/EntityGridPanel.php#L78-L115
webforge-labs/psc-cms
lib/Psc/CMS/EntityGridPanel.php
EntityGridPanel.addEntities
public function addEntities($entities) { foreach ($entities as $entity) { $row = array(); foreach ($this->columns as $columnName => $column) { $converter = $column->getConverter(); $row[] = $converter($entity, $column); } $this->addRow($row); } return $this; }
php
public function addEntities($entities) { foreach ($entities as $entity) { $row = array(); foreach ($this->columns as $columnName => $column) { $converter = $column->getConverter(); $row[] = $converter($entity, $column); } $this->addRow($row); } return $this; }
[ "public", "function", "addEntities", "(", "$", "entities", ")", "{", "foreach", "(", "$", "entities", "as", "$", "entity", ")", "{", "$", "row", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "columns", "as", "$", "columnName", "=>",...
Fügt mehrere Entities dem Grid hinzu
[ "Fügt", "mehrere", "Entities", "dem", "Grid", "hinzu" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/CMS/EntityGridPanel.php#L120-L130
webforge-labs/psc-cms
lib/Psc/Doctrine/NestedSetFixture.php
NestedSetFixture.load
public function load(ObjectManager $em) { $bridge = new DoctrineBridge($em); $bridge->beginTransaction(); $nodes = $this->convertNodes($this->example->toParentPointerArray(), $em); foreach($nodes as $node) { $bridge->persist($node); } $bridge->commit(); $em->flush(); }
php
public function load(ObjectManager $em) { $bridge = new DoctrineBridge($em); $bridge->beginTransaction(); $nodes = $this->convertNodes($this->example->toParentPointerArray(), $em); foreach($nodes as $node) { $bridge->persist($node); } $bridge->commit(); $em->flush(); }
[ "public", "function", "load", "(", "ObjectManager", "$", "em", ")", "{", "$", "bridge", "=", "new", "DoctrineBridge", "(", "$", "em", ")", ";", "$", "bridge", "->", "beginTransaction", "(", ")", ";", "$", "nodes", "=", "$", "this", "->", "convertNodes"...
Load data fixtures with the passed EntityManager @param Doctrine\Common\Persistence\ObjectManager $manager
[ "Load", "data", "fixtures", "with", "the", "passed", "EntityManager" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/NestedSetFixture.php#L30-L42
webforge-labs/psc-cms
lib/Psc/Doctrine/NestedSetFixture.php
NestedSetFixture.convertNodes
protected function convertNodes(Array $nodes, $em) { // our test project (this) is defined to have only de as i18n but dont get confused, these are english wordings $navigationNodes = array(); foreach ($nodes as $node) { $node = (object) $node; $navigationNode = $this->createNode(array('de'=>$n...
php
protected function convertNodes(Array $nodes, $em) { // our test project (this) is defined to have only de as i18n but dont get confused, these are english wordings $navigationNodes = array(); foreach ($nodes as $node) { $node = (object) $node; $navigationNode = $this->createNode(array('de'=>$n...
[ "protected", "function", "convertNodes", "(", "Array", "$", "nodes", ",", "$", "em", ")", "{", "// our test project (this) is defined to have only de as i18n but dont get confused, these are english wordings", "$", "navigationNodes", "=", "array", "(", ")", ";", "foreach", ...
we elevate every node to an entity and set parent pointers
[ "we", "elevate", "every", "node", "to", "an", "entity", "and", "set", "parent", "pointers" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/NestedSetFixture.php#L47-L75
periaptio/empress-generator
src/Commands/MigrationMakeCommand.php
MigrationMakeCommand.handle
public function handle() { parent::handle(); $this->comment('Generating migrations for: '. implode(', ', $this->tables)); $migrationGenerator = new MigrationGenerator($this); $migrationGenerator->generate(); }
php
public function handle() { parent::handle(); $this->comment('Generating migrations for: '. implode(', ', $this->tables)); $migrationGenerator = new MigrationGenerator($this); $migrationGenerator->generate(); }
[ "public", "function", "handle", "(", ")", "{", "parent", "::", "handle", "(", ")", ";", "$", "this", "->", "comment", "(", "'Generating migrations for: '", ".", "implode", "(", "', '", ",", "$", "this", "->", "tables", ")", ")", ";", "$", "migrationGener...
Execute the command. @return void
[ "Execute", "the", "command", "." ]
train
https://github.com/periaptio/empress-generator/blob/749fb4b12755819e9c97377ebfb446ee0822168a/src/Commands/MigrationMakeCommand.php#L41-L49
flipboxstudio/orm-manager
src/Flipbox/OrmManager/Relations/MorphOne.php
MorphOne.setDefaultOptions
protected function setDefaultOptions(array $options=[]) { parent::setDefaultOptions($options); $this->defaultOptions['primary_key'] = $this->toModel->getKeyName(); }
php
protected function setDefaultOptions(array $options=[]) { parent::setDefaultOptions($options); $this->defaultOptions['primary_key'] = $this->toModel->getKeyName(); }
[ "protected", "function", "setDefaultOptions", "(", "array", "$", "options", "=", "[", "]", ")", "{", "parent", "::", "setDefaultOptions", "(", "$", "options", ")", ";", "$", "this", "->", "defaultOptions", "[", "'primary_key'", "]", "=", "$", "this", "->",...
set default options @param $options @return void
[ "set", "default", "options" ]
train
https://github.com/flipboxstudio/orm-manager/blob/4288426517f53d05177b8729c4ba94c5beca9a98/src/Flipbox/OrmManager/Relations/MorphOne.php#L29-L35
flipboxstudio/orm-manager
src/Flipbox/OrmManager/Relations/MorphOne.php
MorphOne.stylingText
protected function stylingText() { parent::stylingText(); $this->text['table'] = "[".$this->command->paintString($this->model->getTable(), 'green')."]"; $this->text['primary_key'] = "[".$this->command->paintString($this->defaultOptions['primary_key'], 'green')."]"; $this->text['prim...
php
protected function stylingText() { parent::stylingText(); $this->text['table'] = "[".$this->command->paintString($this->model->getTable(), 'green')."]"; $this->text['primary_key'] = "[".$this->command->paintString($this->defaultOptions['primary_key'], 'green')."]"; $this->text['prim...
[ "protected", "function", "stylingText", "(", ")", "{", "parent", "::", "stylingText", "(", ")", ";", "$", "this", "->", "text", "[", "'table'", "]", "=", "\"[\"", ".", "$", "this", "->", "command", "->", "paintString", "(", "$", "this", "->", "model", ...
styling text @return void
[ "styling", "text" ]
train
https://github.com/flipboxstudio/orm-manager/blob/4288426517f53d05177b8729c4ba94c5beca9a98/src/Flipbox/OrmManager/Relations/MorphOne.php#L42-L49
flipboxstudio/orm-manager
src/Flipbox/OrmManager/Relations/MorphOne.php
MorphOne.setConnectedRelationOptions
protected function setConnectedRelationOptions() { parent::setConnectedRelationOptions(); if (! $this->db->isFieldExists($table = $this->model->getTable(), $this->defaultOptions['primary_key'])) { $this->options['primary_key'] = $this->command->choice( "Can't find field ...
php
protected function setConnectedRelationOptions() { parent::setConnectedRelationOptions(); if (! $this->db->isFieldExists($table = $this->model->getTable(), $this->defaultOptions['primary_key'])) { $this->options['primary_key'] = $this->command->choice( "Can't find field ...
[ "protected", "function", "setConnectedRelationOptions", "(", ")", "{", "parent", "::", "setConnectedRelationOptions", "(", ")", ";", "if", "(", "!", "$", "this", "->", "db", "->", "isFieldExists", "(", "$", "table", "=", "$", "this", "->", "model", "->", "...
set connected db relation options @return void
[ "set", "connected", "db", "relation", "options" ]
train
https://github.com/flipboxstudio/orm-manager/blob/4288426517f53d05177b8729c4ba94c5beca9a98/src/Flipbox/OrmManager/Relations/MorphOne.php#L56-L66
flipboxstudio/orm-manager
src/Flipbox/OrmManager/Relations/MorphOne.php
MorphOne.askToUseCustomeOptions
protected function askToUseCustomeOptions() { parent::askToUseCustomeOptions(); $this->options['primary_key'] = $this->command->ask( "The {$this->text['primary_text']} of the table {$this->text['table']} will be?", ...
php
protected function askToUseCustomeOptions() { parent::askToUseCustomeOptions(); $this->options['primary_key'] = $this->command->ask( "The {$this->text['primary_text']} of the table {$this->text['table']} will be?", ...
[ "protected", "function", "askToUseCustomeOptions", "(", ")", "{", "parent", "::", "askToUseCustomeOptions", "(", ")", ";", "$", "this", "->", "options", "[", "'primary_key'", "]", "=", "$", "this", "->", "command", "->", "ask", "(", "\"The {$this->text['primary_...
ask to use custome options @return void
[ "ask", "to", "use", "custome", "options" ]
train
https://github.com/flipboxstudio/orm-manager/blob/4288426517f53d05177b8729c4ba94c5beca9a98/src/Flipbox/OrmManager/Relations/MorphOne.php#L98-L106
inpsyde/inpsyde-filter
src/WordPress/SanitizeFileName.php
SanitizeFileName.filter
public function filter( $value ) { if ( ! is_string( $value ) || empty( $value ) ) { do_action( 'inpsyde.filter.error', 'The given value is not string or empty.', [ 'method' => __METHOD__, 'value' => $value ] ); return $value; } return sanitize_file_name( $value ); }
php
public function filter( $value ) { if ( ! is_string( $value ) || empty( $value ) ) { do_action( 'inpsyde.filter.error', 'The given value is not string or empty.', [ 'method' => __METHOD__, 'value' => $value ] ); return $value; } return sanitize_file_name( $value ); }
[ "public", "function", "filter", "(", "$", "value", ")", "{", "if", "(", "!", "is_string", "(", "$", "value", ")", "||", "empty", "(", "$", "value", ")", ")", "{", "do_action", "(", "'inpsyde.filter.error'", ",", "'The given value is not string or empty.'", "...
{@inheritdoc}
[ "{" ]
train
https://github.com/inpsyde/inpsyde-filter/blob/777a6208ea4dfbeed89e6d0712a35dc25eab498b/src/WordPress/SanitizeFileName.php#L17-L26
vorbind/influx-analytics
src/Mapper/AnalyticsMapper.php
AnalyticsMapper.getRpPoints
public function getRpPoints($rp, $metric, $tags, $granularity, $startDt = null, $endDt = null, $timezone = 'utc') { if (null == $rp || null == $metric) { return []; } $where = []; $query = $this->db->getQueryBuilder() ->retentionPoli...
php
public function getRpPoints($rp, $metric, $tags, $granularity, $startDt = null, $endDt = null, $timezone = 'utc') { if (null == $rp || null == $metric) { return []; } $where = []; $query = $this->db->getQueryBuilder() ->retentionPoli...
[ "public", "function", "getRpPoints", "(", "$", "rp", ",", "$", "metric", ",", "$", "tags", ",", "$", "granularity", ",", "$", "startDt", "=", "null", ",", "$", "endDt", "=", "null", ",", "$", "timezone", "=", "'utc'", ")", "{", "if", "(", "null", ...
Get points from retention policy @param string $rp @param string $metric @param array $tags @param string $granularity @param string $startDt @param string $endDt @param string $timezone @return array
[ "Get", "points", "from", "retention", "policy" ]
train
https://github.com/vorbind/influx-analytics/blob/8c0c150351f045ccd3d57063f2b3b50a2c926e3e/src/Mapper/AnalyticsMapper.php#L57-L96
vorbind/influx-analytics
src/Mapper/AnalyticsMapper.php
AnalyticsMapper.getPoints
public function getPoints($metric, $tags, $granularity, $endDt, $timezone = 'utc') { if ( null == $metric ) { return []; } $where = []; $now = $this->normalizeUTC(date("Y-m-d H:i:s")); $min = intval(date('i')); $minutes = $min > 45 ? 45 : ( ...
php
public function getPoints($metric, $tags, $granularity, $endDt, $timezone = 'utc') { if ( null == $metric ) { return []; } $where = []; $now = $this->normalizeUTC(date("Y-m-d H:i:s")); $min = intval(date('i')); $minutes = $min > 45 ? 45 : ( ...
[ "public", "function", "getPoints", "(", "$", "metric", ",", "$", "tags", ",", "$", "granularity", ",", "$", "endDt", ",", "$", "timezone", "=", "'utc'", ")", "{", "if", "(", "null", "==", "$", "metric", ")", "{", "return", "[", "]", ";", "}", "$"...
Get points from default retention policy @param string $metric @param array $tags @param string $granularity @param string $endDt @param string $timezone @return array
[ "Get", "points", "from", "default", "retention", "policy" ]
train
https://github.com/vorbind/influx-analytics/blob/8c0c150351f045ccd3d57063f2b3b50a2c926e3e/src/Mapper/AnalyticsMapper.php#L108-L147
vorbind/influx-analytics
src/Mapper/AnalyticsMapper.php
AnalyticsMapper.getRpSum
public function getRpSum($rp, $metric, $tags, $startDt = null, $endDt = null) { if (null == $rp || null == $metric) { return 0; } $where = []; if (isset($startDt)) { $where[] = "time >= '" . $startDt . "'"; } if (!isset($...
php
public function getRpSum($rp, $metric, $tags, $startDt = null, $endDt = null) { if (null == $rp || null == $metric) { return 0; } $where = []; if (isset($startDt)) { $where[] = "time >= '" . $startDt . "'"; } if (!isset($...
[ "public", "function", "getRpSum", "(", "$", "rp", ",", "$", "metric", ",", "$", "tags", ",", "$", "startDt", "=", "null", ",", "$", "endDt", "=", "null", ")", "{", "if", "(", "null", "==", "$", "rp", "||", "null", "==", "$", "metric", ")", "{",...
Get total from retention policy @param string $rp @param string $metric @param array $tags @param string $startDt @param string $endDt @return int
[ "Get", "total", "from", "retention", "policy" ]
train
https://github.com/vorbind/influx-analytics/blob/8c0c150351f045ccd3d57063f2b3b50a2c926e3e/src/Mapper/AnalyticsMapper.php#L159-L188
vorbind/influx-analytics
src/Mapper/AnalyticsMapper.php
AnalyticsMapper.getSum
public function getSum($metric, $tags, $endDt = null) { if (null == $metric) { return 0; } $min = intval(date('i')); $minutes = $min > 45 ? 45 : ( $min > 30 ? 30 : ( $min > 15 ? 15 : '00') ); $lastHourDt = date("Y-m-d") . "T" . date('H') . ":$minutes:0...
php
public function getSum($metric, $tags, $endDt = null) { if (null == $metric) { return 0; } $min = intval(date('i')); $minutes = $min > 45 ? 45 : ( $min > 30 ? 30 : ( $min > 15 ? 15 : '00') ); $lastHourDt = date("Y-m-d") . "T" . date('H') . ":$minutes:0...
[ "public", "function", "getSum", "(", "$", "metric", ",", "$", "tags", ",", "$", "endDt", "=", "null", ")", "{", "if", "(", "null", "==", "$", "metric", ")", "{", "return", "0", ";", "}", "$", "min", "=", "intval", "(", "date", "(", "'i'", ")", ...
Get total from default retention policy @param string $metric @param array $tags @param string $endDt @return int
[ "Get", "total", "from", "default", "retention", "policy" ]
train
https://github.com/vorbind/influx-analytics/blob/8c0c150351f045ccd3d57063f2b3b50a2c926e3e/src/Mapper/AnalyticsMapper.php#L198-L231
vorbind/influx-analytics
src/Mapper/AnalyticsMapper.php
AnalyticsMapper.save
public function save($metric, $tags = array(), $value = 1, $date = null, $rp = null) { try { $command = isset($date) ? " -d '" . $this->normalizeUTC($date) . "'" : ""; // Time precision is in nanaoseconds $timeNs = exec("date $command +%s%N"); $fields = array(); ...
php
public function save($metric, $tags = array(), $value = 1, $date = null, $rp = null) { try { $command = isset($date) ? " -d '" . $this->normalizeUTC($date) . "'" : ""; // Time precision is in nanaoseconds $timeNs = exec("date $command +%s%N"); $fields = array(); ...
[ "public", "function", "save", "(", "$", "metric", ",", "$", "tags", "=", "array", "(", ")", ",", "$", "value", "=", "1", ",", "$", "date", "=", "null", ",", "$", "rp", "=", "null", ")", "{", "try", "{", "$", "command", "=", "isset", "(", "$",...
Save analytics @param string $metric @param array $tags @param int $value @param string $date @param string $rp @return void @throws AnalyticsException
[ "Save", "analytics" ]
train
https://github.com/vorbind/influx-analytics/blob/8c0c150351f045ccd3d57063f2b3b50a2c926e3e/src/Mapper/AnalyticsMapper.php#L244-L264
ppetermann/king23
src/Http/Application.php
Application.run
public function run() { /** @var ResponseInterface $response */ $response = $this->queue->handle($this->request); // http status $reasonPhrase = $response->getReasonPhrase(); $reasonPhrase = ($reasonPhrase ? ' '.$reasonPhrase : ''); header(sprintf('HTTP/%s %d%s', $re...
php
public function run() { /** @var ResponseInterface $response */ $response = $this->queue->handle($this->request); // http status $reasonPhrase = $response->getReasonPhrase(); $reasonPhrase = ($reasonPhrase ? ' '.$reasonPhrase : ''); header(sprintf('HTTP/%s %d%s', $re...
[ "public", "function", "run", "(", ")", "{", "/** @var ResponseInterface $response */", "$", "response", "=", "$", "this", "->", "queue", "->", "handle", "(", "$", "this", "->", "request", ")", ";", "// http status", "$", "reasonPhrase", "=", "$", "response", ...
run a http based application
[ "run", "a", "http", "based", "application" ]
train
https://github.com/ppetermann/king23/blob/603896083ec89f5ac4d744abd3b1b4db3e914c95/src/Http/Application.php#L66-L85
RobinDumontChaponet/TransitiveCore
src/simple/View.php
View.cacheBust
public static function cacheBust(string $src): string { if(!file_exists($src)) return $src; $path = pathinfo($src); return $path['dirname'].'/'.$path['filename'].'.'.filemtime($src).'.'.$path['extension']; }
php
public static function cacheBust(string $src): string { if(!file_exists($src)) return $src; $path = pathinfo($src); return $path['dirname'].'/'.$path['filename'].'.'.filemtime($src).'.'.$path['extension']; }
[ "public", "static", "function", "cacheBust", "(", "string", "$", "src", ")", ":", "string", "{", "if", "(", "!", "file_exists", "(", "$", "src", ")", ")", "return", "$", "src", ";", "$", "path", "=", "pathinfo", "(", "$", "src", ")", ";", "return",...
cacheBust function. @param string $src @return string
[ "cacheBust", "function", "." ]
train
https://github.com/RobinDumontChaponet/TransitiveCore/blob/b83dd6fe0e49b8773de0f60861e5a5c306e2a38d/src/simple/View.php#L37-L45
RobinDumontChaponet/TransitiveCore
src/simple/View.php
View.getTitle
public function getTitle(string $prefix = '', string $separator = ' | ', string $sufix = ''): string { if(empty($this->getTitleValue())) $separator = ''; return $prefix.$separator.$this->getTitleValue().$sufix; }
php
public function getTitle(string $prefix = '', string $separator = ' | ', string $sufix = ''): string { if(empty($this->getTitleValue())) $separator = ''; return $prefix.$separator.$this->getTitleValue().$sufix; }
[ "public", "function", "getTitle", "(", "string", "$", "prefix", "=", "''", ",", "string", "$", "separator", "=", "' | '", ",", "string", "$", "sufix", "=", "''", ")", ":", "string", "{", "if", "(", "empty", "(", "$", "this", "->", "getTitleValue", "(...
Get the view's title.
[ "Get", "the", "view", "s", "title", "." ]
train
https://github.com/RobinDumontChaponet/TransitiveCore/blob/b83dd6fe0e49b8773de0f60861e5a5c306e2a38d/src/simple/View.php#L78-L84
RobinDumontChaponet/TransitiveCore
src/simple/View.php
View.hasContent
public function hasContent(?string $contentType = null, ?string $contentKey = null): bool { return isset($this->content[$contentType][$contentKey]); }
php
public function hasContent(?string $contentType = null, ?string $contentKey = null): bool { return isset($this->content[$contentType][$contentKey]); }
[ "public", "function", "hasContent", "(", "?", "string", "$", "contentType", "=", "null", ",", "?", "string", "$", "contentKey", "=", "null", ")", ":", "bool", "{", "return", "isset", "(", "$", "this", "->", "content", "[", "$", "contentType", "]", "[",...
@param string $key = null @return bool
[ "@param", "string", "$key", "=", "null" ]
train
https://github.com/RobinDumontChaponet/TransitiveCore/blob/b83dd6fe0e49b8773de0f60861e5a5c306e2a38d/src/simple/View.php#L101-L104
RobinDumontChaponet/TransitiveCore
src/simple/View.php
View._getContent
protected function _getContent($content) { if(!isset($content)) return; if(is_array($content)) return array_map( function ($value) { return $this->_getContent($value); }, $content ); switch(gettype($con...
php
protected function _getContent($content) { if(!isset($content)) return; if(is_array($content)) return array_map( function ($value) { return $this->_getContent($value); }, $content ); switch(gettype($con...
[ "protected", "function", "_getContent", "(", "$", "content", ")", "{", "if", "(", "!", "isset", "(", "$", "content", ")", ")", "return", ";", "if", "(", "is_array", "(", "$", "content", ")", ")", "return", "array_map", "(", "function", "(", "$", "val...
@param mixed content @return mixed
[ "@param", "mixed", "content" ]
train
https://github.com/RobinDumontChaponet/TransitiveCore/blob/b83dd6fe0e49b8773de0f60861e5a5c306e2a38d/src/simple/View.php#L111-L143
RobinDumontChaponet/TransitiveCore
src/simple/View.php
View.getContent
public function getContent(?string $contentType = null, ?string $contentKey = null): Core\ViewResource { return new Core\ViewResource($this->_getContent(@$this->content[$contentType][$contentKey])); }
php
public function getContent(?string $contentType = null, ?string $contentKey = null): Core\ViewResource { return new Core\ViewResource($this->_getContent(@$this->content[$contentType][$contentKey])); }
[ "public", "function", "getContent", "(", "?", "string", "$", "contentType", "=", "null", ",", "?", "string", "$", "contentKey", "=", "null", ")", ":", "Core", "\\", "ViewResource", "{", "return", "new", "Core", "\\", "ViewResource", "(", "$", "this", "->...
@param string $key = null @param string $contentType = null @return Core\ViewResource
[ "@param", "string", "$key", "=", "null", "@param", "string", "$contentType", "=", "null" ]
train
https://github.com/RobinDumontChaponet/TransitiveCore/blob/b83dd6fe0e49b8773de0f60861e5a5c306e2a38d/src/simple/View.php#L151-L154
RobinDumontChaponet/TransitiveCore
src/simple/View.php
View.getDocument
public function getDocument(?string $contentType = null, ?string $contentKey = null): Core\ViewResource { return new Core\ViewResource(array( 'head' => $this->getHead()->asArray, 'content' => $this->getContent($contentKey, $contentType)->asArray, ), 'asJSON'); }
php
public function getDocument(?string $contentType = null, ?string $contentKey = null): Core\ViewResource { return new Core\ViewResource(array( 'head' => $this->getHead()->asArray, 'content' => $this->getContent($contentKey, $contentType)->asArray, ), 'asJSON'); }
[ "public", "function", "getDocument", "(", "?", "string", "$", "contentType", "=", "null", ",", "?", "string", "$", "contentKey", "=", "null", ")", ":", "Core", "\\", "ViewResource", "{", "return", "new", "Core", "\\", "ViewResource", "(", "array", "(", "...
/* @param string $content = null @param string $contentType = null @return Core\ViewResource
[ "/", "*" ]
train
https://github.com/RobinDumontChaponet/TransitiveCore/blob/b83dd6fe0e49b8773de0f60861e5a5c306e2a38d/src/simple/View.php#L235-L241
RobinDumontChaponet/TransitiveCore
src/simple/View.php
View.getAllDocument
public function getAllDocument(): Core\ViewResource { return new Core\ViewResource(array( 'head' => $this->getHead()->asArray, 'content' => $this->getAllContent()->asArray, ), 'asJSON'); }
php
public function getAllDocument(): Core\ViewResource { return new Core\ViewResource(array( 'head' => $this->getHead()->asArray, 'content' => $this->getAllContent()->asArray, ), 'asJSON'); }
[ "public", "function", "getAllDocument", "(", ")", ":", "Core", "\\", "ViewResource", "{", "return", "new", "Core", "\\", "ViewResource", "(", "array", "(", "'head'", "=>", "$", "this", "->", "getHead", "(", ")", "->", "asArray", ",", "'content'", "=>", "...
/* @param string $content = null @return Core\ViewResource
[ "/", "*" ]
train
https://github.com/RobinDumontChaponet/TransitiveCore/blob/b83dd6fe0e49b8773de0f60861e5a5c306e2a38d/src/simple/View.php#L247-L253
leedavis81/altr-ego
library/AltrEgo/Adapter/Php53.php
Php53._call
public function _call($name, $arguments) { $object = $this->getObject(); try { $method = new \ReflectionMethod($object, $name); } catch (\Exception $e) { if (method_exists($object, '__call')) { return call_user_func_array(array($object, '__call'), (array) $arguments); ...
php
public function _call($name, $arguments) { $object = $this->getObject(); try { $method = new \ReflectionMethod($object, $name); } catch (\Exception $e) { if (method_exists($object, '__call')) { return call_user_func_array(array($object, '__call'), (array) $arguments); ...
[ "public", "function", "_call", "(", "$", "name", ",", "$", "arguments", ")", "{", "$", "object", "=", "$", "this", "->", "getObject", "(", ")", ";", "try", "{", "$", "method", "=", "new", "\\", "ReflectionMethod", "(", "$", "object", ",", "$", "nam...
(non-PHPdoc) @see AltrEgo\Adapter.AdapterInterface::_call()
[ "(", "non", "-", "PHPdoc", ")" ]
train
https://github.com/leedavis81/altr-ego/blob/1556556a33c2b6caddef94444522c5bbffc217c7/library/AltrEgo/Adapter/Php53.php#L47-L67
leedavis81/altr-ego
library/AltrEgo/Adapter/Php53.php
Php53._get
public function _get($name) { $object = $this->getObject(); $property = $this->getReflectionProperty($name); $value = $property->getValue($this->getObject()); if (is_array($value)) { $property->setValue($object, new \ArrayObject($value)); } return $property-...
php
public function _get($name) { $object = $this->getObject(); $property = $this->getReflectionProperty($name); $value = $property->getValue($this->getObject()); if (is_array($value)) { $property->setValue($object, new \ArrayObject($value)); } return $property-...
[ "public", "function", "_get", "(", "$", "name", ")", "{", "$", "object", "=", "$", "this", "->", "getObject", "(", ")", ";", "$", "property", "=", "$", "this", "->", "getReflectionProperty", "(", "$", "name", ")", ";", "$", "value", "=", "$", "prop...
(non-PHPdoc) @see AltrEgo\Adapter.AdapterInterface::_get()
[ "(", "non", "-", "PHPdoc", ")" ]
train
https://github.com/leedavis81/altr-ego/blob/1556556a33c2b6caddef94444522c5bbffc217c7/library/AltrEgo/Adapter/Php53.php#L72-L84
leedavis81/altr-ego
library/AltrEgo/Adapter/Php53.php
Php53._set
public function _set($name, $value) { $property = $this->getReflectionProperty($name); return $property->setValue($this->getObject(), $value); }
php
public function _set($name, $value) { $property = $this->getReflectionProperty($name); return $property->setValue($this->getObject(), $value); }
[ "public", "function", "_set", "(", "$", "name", ",", "$", "value", ")", "{", "$", "property", "=", "$", "this", "->", "getReflectionProperty", "(", "$", "name", ")", ";", "return", "$", "property", "->", "setValue", "(", "$", "this", "->", "getObject",...
(non-PHPdoc) @see AltrEgo\Adapter.AdapterInterface::_set()
[ "(", "non", "-", "PHPdoc", ")" ]
train
https://github.com/leedavis81/altr-ego/blob/1556556a33c2b6caddef94444522c5bbffc217c7/library/AltrEgo/Adapter/Php53.php#L89-L93
leedavis81/altr-ego
library/AltrEgo/Adapter/Php53.php
Php53._callStatic
public static function _callStatic($object, $name, $arguments) { if (is_object($object)) { $object = ($object instanceof AltrEgo) ? $object->getObject() : $object; } elseif (!class_exists($object)) { throw new \Exception('Static call (callStatic) to AltrEgo must be passed either an object or an access...
php
public static function _callStatic($object, $name, $arguments) { if (is_object($object)) { $object = ($object instanceof AltrEgo) ? $object->getObject() : $object; } elseif (!class_exists($object)) { throw new \Exception('Static call (callStatic) to AltrEgo must be passed either an object or an access...
[ "public", "static", "function", "_callStatic", "(", "$", "object", ",", "$", "name", ",", "$", "arguments", ")", "{", "if", "(", "is_object", "(", "$", "object", ")", ")", "{", "$", "object", "=", "(", "$", "object", "instanceof", "AltrEgo", ")", "?"...
(non-PHPdoc) @see AltrEgo\Adapter.AdapterInterface::_callStatic()
[ "(", "non", "-", "PHPdoc", ")" ]
train
https://github.com/leedavis81/altr-ego/blob/1556556a33c2b6caddef94444522c5bbffc217c7/library/AltrEgo/Adapter/Php53.php#L114-L136
leedavis81/altr-ego
library/AltrEgo/Adapter/Php53.php
Php53.getReflectionProperty
protected function getReflectionProperty($name) { do { $reflClass = (!isset($reflClass)) ? new \ReflectionClass($this->getObject()) : $reflClass; $property = $reflClass->getProperty($name); if (isset($property)) { break; } ...
php
protected function getReflectionProperty($name) { do { $reflClass = (!isset($reflClass)) ? new \ReflectionClass($this->getObject()) : $reflClass; $property = $reflClass->getProperty($name); if (isset($property)) { break; } ...
[ "protected", "function", "getReflectionProperty", "(", "$", "name", ")", "{", "do", "{", "$", "reflClass", "=", "(", "!", "isset", "(", "$", "reflClass", ")", ")", "?", "new", "\\", "ReflectionClass", "(", "$", "this", "->", "getObject", "(", ")", ")",...
Get a reflection property - may need to iterate through class parents @param string $name
[ "Get", "a", "reflection", "property", "-", "may", "need", "to", "iterate", "through", "class", "parents" ]
train
https://github.com/leedavis81/altr-ego/blob/1556556a33c2b6caddef94444522c5bbffc217c7/library/AltrEgo/Adapter/Php53.php#L142-L162
webforge-labs/psc-cms
lib/Psc/Doctrine/Entities/BasicUploadedFile.php
BasicUploadedFile.export
public function export() { $export = parent::export(); $export->url = $this->getURL(); // url für die response hinzufügen $export->size = $this->getFile()->getSize(); unset($export->file); return $export; }
php
public function export() { $export = parent::export(); $export->url = $this->getURL(); // url für die response hinzufügen $export->size = $this->getFile()->getSize(); unset($export->file); return $export; }
[ "public", "function", "export", "(", ")", "{", "$", "export", "=", "parent", "::", "export", "(", ")", ";", "$", "export", "->", "url", "=", "$", "this", "->", "getURL", "(", ")", ";", "// url für die response hinzufügen", "$", "export", "->", "size", ...
Exportiert das Entity für z.B. die Controller Response
[ "Exportiert", "das", "Entity", "für", "z", ".", "B", ".", "die", "Controller", "Response" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/Entities/BasicUploadedFile.php#L81-L88
php-rise/rise
src/Template.php
Template.render
public function render($template = '', $data = []) { if (!isset($this->blocks[$template])) { $this->blocks[$template] = $this->blockFactory->create($template); } $block = $this->blocks[$template]; $block->setData($data); return $block->render(); }
php
public function render($template = '', $data = []) { if (!isset($this->blocks[$template])) { $this->blocks[$template] = $this->blockFactory->create($template); } $block = $this->blocks[$template]; $block->setData($data); return $block->render(); }
[ "public", "function", "render", "(", "$", "template", "=", "''", ",", "$", "data", "=", "[", "]", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "blocks", "[", "$", "template", "]", ")", ")", "{", "$", "this", "->", "blocks", "[", ...
Render a block. @param string $template @param array $data @return string
[ "Render", "a", "block", "." ]
train
https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Template.php#L32-L39
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php
BaseLicenseQuery.create
public static function create($modelAlias = null, $criteria = null) { if ($criteria instanceof LicenseQuery) { return $criteria; } $query = new LicenseQuery(null, null, $modelAlias); if ($criteria instanceof Criteria) { $query->mergeWith($criteria); }...
php
public static function create($modelAlias = null, $criteria = null) { if ($criteria instanceof LicenseQuery) { return $criteria; } $query = new LicenseQuery(null, null, $modelAlias); if ($criteria instanceof Criteria) { $query->mergeWith($criteria); }...
[ "public", "static", "function", "create", "(", "$", "modelAlias", "=", "null", ",", "$", "criteria", "=", "null", ")", "{", "if", "(", "$", "criteria", "instanceof", "LicenseQuery", ")", "{", "return", "$", "criteria", ";", "}", "$", "query", "=", "new...
Returns a new LicenseQuery object. @param string $modelAlias The alias of a model in the query @param LicenseQuery|Criteria $criteria Optional Criteria to build the query from @return LicenseQuery
[ "Returns", "a", "new", "LicenseQuery", "object", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php#L76-L88
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php
BaseLicenseQuery.filterByMaxClients
public function filterByMaxClients($maxClients = null, $comparison = null) { if (is_array($maxClients)) { $useMinMax = false; if (isset($maxClients['min'])) { $this->addUsingAlias(LicensePeer::MAX_CLIENTS, $maxClients['min'], Criteria::GREATER_EQUAL); ...
php
public function filterByMaxClients($maxClients = null, $comparison = null) { if (is_array($maxClients)) { $useMinMax = false; if (isset($maxClients['min'])) { $this->addUsingAlias(LicensePeer::MAX_CLIENTS, $maxClients['min'], Criteria::GREATER_EQUAL); ...
[ "public", "function", "filterByMaxClients", "(", "$", "maxClients", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "maxClients", ")", ")", "{", "$", "useMinMax", "=", "false", ";", "if", "(", "isset", "(", ...
Filter the query on the max_clients column Example usage: <code> $query->filterByMaxClients(1234); // WHERE max_clients = 1234 $query->filterByMaxClients(array(12, 34)); // WHERE max_clients IN (12, 34) $query->filterByMaxClients(array('min' => 12)); // WHERE max_clients >= 12 $query->filterByMaxClients(array('max' =>...
[ "Filter", "the", "query", "on", "the", "max_clients", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php#L302-L323
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php
BaseLicenseQuery.filterByDomain
public function filterByDomain($domain = null, $comparison = null) { if (null === $comparison) { if (is_array($domain)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $domain)) { $domain = str_replace('*', '%', $domain); ...
php
public function filterByDomain($domain = null, $comparison = null) { if (null === $comparison) { if (is_array($domain)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $domain)) { $domain = str_replace('*', '%', $domain); ...
[ "public", "function", "filterByDomain", "(", "$", "domain", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "domain", ")", ")", "{", "$", "comparison"...
Filter the query on the domain column Example usage: <code> $query->filterByDomain('fooValue'); // WHERE domain = 'fooValue' $query->filterByDomain('%fooValue%'); // WHERE domain LIKE '%fooValue%' </code> @param string $domain The value to use as filter. Accepts wildcards (* and % trigger a LIKE) @param str...
[ "Filter", "the", "query", "on", "the", "domain", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php#L340-L352
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php
BaseLicenseQuery.filterByValidUntil
public function filterByValidUntil($validUntil = null, $comparison = null) { if (null === $comparison) { if (is_array($validUntil)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $validUntil)) { $validUntil = str_replace('*', '%', $vali...
php
public function filterByValidUntil($validUntil = null, $comparison = null) { if (null === $comparison) { if (is_array($validUntil)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $validUntil)) { $validUntil = str_replace('*', '%', $vali...
[ "public", "function", "filterByValidUntil", "(", "$", "validUntil", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "validUntil", ")", ")", "{", "$", ...
Filter the query on the valid_until column Example usage: <code> $query->filterByValidUntil('fooValue'); // WHERE valid_until = 'fooValue' $query->filterByValidUntil('%fooValue%'); // WHERE valid_until LIKE '%fooValue%' </code> @param string $validUntil The value to use as filter. Accepts wildcards (* and % tri...
[ "Filter", "the", "query", "on", "the", "valid_until", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php#L369-L381
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php
BaseLicenseQuery.filterBySerial
public function filterBySerial($serial = null, $comparison = null) { if (null === $comparison) { if (is_array($serial)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $serial)) { $serial = str_replace('*', '%', $serial); ...
php
public function filterBySerial($serial = null, $comparison = null) { if (null === $comparison) { if (is_array($serial)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $serial)) { $serial = str_replace('*', '%', $serial); ...
[ "public", "function", "filterBySerial", "(", "$", "serial", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "serial", ")", ")", "{", "$", "comparison"...
Filter the query on the serial column Example usage: <code> $query->filterBySerial('fooValue'); // WHERE serial = 'fooValue' $query->filterBySerial('%fooValue%'); // WHERE serial LIKE '%fooValue%' </code> @param string $serial The value to use as filter. Accepts wildcards (* and % trigger a LIKE) @param str...
[ "Filter", "the", "query", "on", "the", "serial", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php#L398-L410
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php
BaseLicenseQuery.prune
public function prune($license = null) { if ($license) { $this->addUsingAlias(LicensePeer::ID, $license->getId(), Criteria::NOT_EQUAL); } return $this; }
php
public function prune($license = null) { if ($license) { $this->addUsingAlias(LicensePeer::ID, $license->getId(), Criteria::NOT_EQUAL); } return $this; }
[ "public", "function", "prune", "(", "$", "license", "=", "null", ")", "{", "if", "(", "$", "license", ")", "{", "$", "this", "->", "addUsingAlias", "(", "LicensePeer", "::", "ID", ",", "$", "license", "->", "getId", "(", ")", ",", "Criteria", "::", ...
Exclude object from result @param License $license Object to remove from the list of results @return LicenseQuery The current query, for fluid interface
[ "Exclude", "object", "from", "result" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseLicenseQuery.php#L419-L426
anime-db/world-art-filler-bundle
src/Event/Listener/Refiller.php
Refiller.onAddNewItem
public function onAddNewItem(AddNewItem $event) { $item = $event->getItem(); if (!$event->getFillers()->contains($this->filler) && ($url = $this->refiller->getSourceForFill($item))) { $new_item = $this->filler->fill(['url' => $url]); // fill item if (!$item->getC...
php
public function onAddNewItem(AddNewItem $event) { $item = $event->getItem(); if (!$event->getFillers()->contains($this->filler) && ($url = $this->refiller->getSourceForFill($item))) { $new_item = $this->filler->fill(['url' => $url]); // fill item if (!$item->getC...
[ "public", "function", "onAddNewItem", "(", "AddNewItem", "$", "event", ")", "{", "$", "item", "=", "$", "event", "->", "getItem", "(", ")", ";", "if", "(", "!", "$", "event", "->", "getFillers", "(", ")", "->", "contains", "(", "$", "this", "->", "...
On add new item. @param \AnimeDb\Bundle\CatalogBundle\Event\Storage\AddNewItem $event
[ "On", "add", "new", "item", "." ]
train
https://github.com/anime-db/world-art-filler-bundle/blob/f2ef4dbd12fe39c18183d1628b5049b8d381e42c/src/Event/Listener/Refiller.php#L64-L127
nyeholt/silverstripe-external-content
thirdparty/Zend/Feed/Element.php
Zend_Feed_Element.setDOM
public function setDOM(DOMElement $element) { $this->_element = $this->_element->ownerDocument->importNode($element, true); }
php
public function setDOM(DOMElement $element) { $this->_element = $this->_element->ownerDocument->importNode($element, true); }
[ "public", "function", "setDOM", "(", "DOMElement", "$", "element", ")", "{", "$", "this", "->", "_element", "=", "$", "this", "->", "_element", "->", "ownerDocument", "->", "importNode", "(", "$", "element", ",", "true", ")", ";", "}" ]
Update the object from a DOM element Take a DOMElement object, which may be originally from a call to getDOM() or may be custom created, and use it as the DOM tree for this Zend_Feed_Element. @param DOMElement $element @return void
[ "Update", "the", "object", "from", "a", "DOM", "element" ]
train
https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Feed/Element.php#L87-L90
nyeholt/silverstripe-external-content
thirdparty/Zend/Feed/Element.php
Zend_Feed_Element.ensureAppended
protected function ensureAppended() { if (!$this->_appended) { $this->_parentElement->getDOM()->appendChild($this->_element); $this->_appended = true; $this->_parentElement->ensureAppended(); } }
php
protected function ensureAppended() { if (!$this->_appended) { $this->_parentElement->getDOM()->appendChild($this->_element); $this->_appended = true; $this->_parentElement->ensureAppended(); } }
[ "protected", "function", "ensureAppended", "(", ")", "{", "if", "(", "!", "$", "this", "->", "_appended", ")", "{", "$", "this", "->", "_parentElement", "->", "getDOM", "(", ")", "->", "appendChild", "(", "$", "this", "->", "_element", ")", ";", "$", ...
Appends this element to its parent if necessary. @return void
[ "Appends", "this", "element", "to", "its", "parent", "if", "necessary", "." ]
train
https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Feed/Element.php#L111-L118
nyeholt/silverstripe-external-content
thirdparty/Zend/Feed/Element.php
Zend_Feed_Element.__isset
public function __isset($var) { // Look for access of the form {ns:var}. We don't use // _children() here because we can break out of the loop // immediately once we find something. if (strpos($var, ':') !== false) { list($ns, $elt) = explode(':', $var, 2); fo...
php
public function __isset($var) { // Look for access of the form {ns:var}. We don't use // _children() here because we can break out of the loop // immediately once we find something. if (strpos($var, ':') !== false) { list($ns, $elt) = explode(':', $var, 2); fo...
[ "public", "function", "__isset", "(", "$", "var", ")", "{", "// Look for access of the form {ns:var}. We don't use", "// _children() here because we can break out of the loop", "// immediately once we find something.", "if", "(", "strpos", "(", "$", "var", ",", "':'", ")", "!...
Map isset calls onto the underlying entry representation. @param string $var @return boolean
[ "Map", "isset", "calls", "onto", "the", "underlying", "entry", "representation", "." ]
train
https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Feed/Element.php#L231-L250
nyeholt/silverstripe-external-content
thirdparty/Zend/Feed/Element.php
Zend_Feed_Element._children
protected function _children($var) { $found = array(); // Look for access of the form {ns:var}. if (strpos($var, ':') !== false) { list($ns, $elt) = explode(':', $var, 2); foreach ($this->_element->childNodes as $child) { if ($child->localName == $elt...
php
protected function _children($var) { $found = array(); // Look for access of the form {ns:var}. if (strpos($var, ':') !== false) { list($ns, $elt) = explode(':', $var, 2); foreach ($this->_element->childNodes as $child) { if ($child->localName == $elt...
[ "protected", "function", "_children", "(", "$", "var", ")", "{", "$", "found", "=", "array", "(", ")", ";", "// Look for access of the form {ns:var}.", "if", "(", "strpos", "(", "$", "var", ",", "':'", ")", "!==", "false", ")", "{", "list", "(", "$", "...
Finds children with tagnames matching $var Similar to SimpleXML's children() method. @param string $var Tagname to match, can be either namespace:tagName or just tagName. @return array
[ "Finds", "children", "with", "tagnames", "matching", "$var" ]
train
https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Feed/Element.php#L314-L335
nyeholt/silverstripe-external-content
thirdparty/Zend/Feed/Element.php
Zend_Feed_Element.offsetExists
public function offsetExists($offset) { if (strpos($offset, ':') !== false) { list($ns, $attr) = explode(':', $offset, 2); return $this->_element->hasAttributeNS(Zend_Feed::lookupNamespace($ns), $attr); } else { return $this->_element->hasAttribute($offset); ...
php
public function offsetExists($offset) { if (strpos($offset, ':') !== false) { list($ns, $attr) = explode(':', $offset, 2); return $this->_element->hasAttributeNS(Zend_Feed::lookupNamespace($ns), $attr); } else { return $this->_element->hasAttribute($offset); ...
[ "public", "function", "offsetExists", "(", "$", "offset", ")", "{", "if", "(", "strpos", "(", "$", "offset", ",", "':'", ")", "!==", "false", ")", "{", "list", "(", "$", "ns", ",", "$", "attr", ")", "=", "explode", "(", "':'", ",", "$", "offset",...
Required by the ArrayAccess interface. @param string $offset @return boolean
[ "Required", "by", "the", "ArrayAccess", "interface", "." ]
train
https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Feed/Element.php#L344-L352
nyeholt/silverstripe-external-content
thirdparty/Zend/Feed/Element.php
Zend_Feed_Element.offsetGet
public function offsetGet($offset) { if (strpos($offset, ':') !== false) { list($ns, $attr) = explode(':', $offset, 2); return $this->_element->getAttributeNS(Zend_Feed::lookupNamespace($ns), $attr); } else { return $this->_element->getAttribute($offset); ...
php
public function offsetGet($offset) { if (strpos($offset, ':') !== false) { list($ns, $attr) = explode(':', $offset, 2); return $this->_element->getAttributeNS(Zend_Feed::lookupNamespace($ns), $attr); } else { return $this->_element->getAttribute($offset); ...
[ "public", "function", "offsetGet", "(", "$", "offset", ")", "{", "if", "(", "strpos", "(", "$", "offset", ",", "':'", ")", "!==", "false", ")", "{", "list", "(", "$", "ns", ",", "$", "attr", ")", "=", "explode", "(", "':'", ",", "$", "offset", ...
Required by the ArrayAccess interface. @param string $offset @return string
[ "Required", "by", "the", "ArrayAccess", "interface", "." ]
train
https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Feed/Element.php#L361-L369
nyeholt/silverstripe-external-content
thirdparty/Zend/Feed/Element.php
Zend_Feed_Element.offsetSet
public function offsetSet($offset, $value) { $this->ensureAppended(); if (strpos($offset, ':') !== false) { list($ns, $attr) = explode(':', $offset, 2); return $this->_element->setAttributeNS(Zend_Feed::lookupNamespace($ns), $attr, $value); } else { retur...
php
public function offsetSet($offset, $value) { $this->ensureAppended(); if (strpos($offset, ':') !== false) { list($ns, $attr) = explode(':', $offset, 2); return $this->_element->setAttributeNS(Zend_Feed::lookupNamespace($ns), $attr, $value); } else { retur...
[ "public", "function", "offsetSet", "(", "$", "offset", ",", "$", "value", ")", "{", "$", "this", "->", "ensureAppended", "(", ")", ";", "if", "(", "strpos", "(", "$", "offset", ",", "':'", ")", "!==", "false", ")", "{", "list", "(", "$", "ns", ",...
Required by the ArrayAccess interface. @param string $offset @param string $value @return string
[ "Required", "by", "the", "ArrayAccess", "interface", "." ]
train
https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Feed/Element.php#L379-L389
nyeholt/silverstripe-external-content
thirdparty/Zend/Feed/Element.php
Zend_Feed_Element.offsetUnset
public function offsetUnset($offset) { if (strpos($offset, ':') !== false) { list($ns, $attr) = explode(':', $offset, 2); return $this->_element->removeAttributeNS(Zend_Feed::lookupNamespace($ns), $attr); } else { return $this->_element->removeAttribute($offset); ...
php
public function offsetUnset($offset) { if (strpos($offset, ':') !== false) { list($ns, $attr) = explode(':', $offset, 2); return $this->_element->removeAttributeNS(Zend_Feed::lookupNamespace($ns), $attr); } else { return $this->_element->removeAttribute($offset); ...
[ "public", "function", "offsetUnset", "(", "$", "offset", ")", "{", "if", "(", "strpos", "(", "$", "offset", ",", "':'", ")", "!==", "false", ")", "{", "list", "(", "$", "ns", ",", "$", "attr", ")", "=", "explode", "(", "':'", ",", "$", "offset", ...
Required by the ArrayAccess interface. @param string $offset @return boolean
[ "Required", "by", "the", "ArrayAccess", "interface", "." ]
train
https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Feed/Element.php#L398-L406
CakeCMS/Core
src/View/Widget/MaterializeCss/TextareaWidget.php
TextareaWidget.render
public function render(array $data, ContextInterface $context) { $data = array_merge(['class' => null], $data); $data['class'] .= ' materialize-textarea'; $data['class'] = Str::trim($data['class']); return parent::render($data, $context); }
php
public function render(array $data, ContextInterface $context) { $data = array_merge(['class' => null], $data); $data['class'] .= ' materialize-textarea'; $data['class'] = Str::trim($data['class']); return parent::render($data, $context); }
[ "public", "function", "render", "(", "array", "$", "data", ",", "ContextInterface", "$", "context", ")", "{", "$", "data", "=", "array_merge", "(", "[", "'class'", "=>", "null", "]", ",", "$", "data", ")", ";", "$", "data", "[", "'class'", "]", ".=",...
Render a text area form widget. Data supports the following keys: - `name` - Set the input name. - `val` - A string of the option to mark as selected. - `escape` - Set to false to disable HTML escaping. All other keys will be converted into HTML attributes. @param array $data The data to build a textarea with. @p...
[ "Render", "a", "text", "area", "form", "widget", "." ]
train
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/View/Widget/MaterializeCss/TextareaWidget.php#L45-L53
webforge-labs/psc-cms
lib/Psc/UI/fHTML.php
fHTML.tag
public static function tag($name, $content = NULL, Array $attributes = NULL) { return \Psc\UI\HTML::tag($name, $content, $attributes); }
php
public static function tag($name, $content = NULL, Array $attributes = NULL) { return \Psc\UI\HTML::tag($name, $content, $attributes); }
[ "public", "static", "function", "tag", "(", "$", "name", ",", "$", "content", "=", "NULL", ",", "Array", "$", "attributes", "=", "NULL", ")", "{", "return", "\\", "Psc", "\\", "UI", "\\", "HTML", "::", "tag", "(", "$", "name", ",", "$", "content", ...
Erzeugt ein neues Tag @param string $name @param mixed $content @param Array $attributes @return \Psc\UI\HTMLTag
[ "Erzeugt", "ein", "neues", "Tag" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/UI/fHTML.php#L17-L19
CPSB/Validation-helper
src/Form.php
Form.input
public function input($name, $default = null) { $value = e($this->value($name, $default)); $name = e($name); return "name=\"$name\" value=\"$value\""; }
php
public function input($name, $default = null) { $value = e($this->value($name, $default)); $name = e($name); return "name=\"$name\" value=\"$value\""; }
[ "public", "function", "input", "(", "$", "name", ",", "$", "default", "=", "null", ")", "{", "$", "value", "=", "e", "(", "$", "this", "->", "value", "(", "$", "name", ",", "$", "default", ")", ")", ";", "$", "name", "=", "e", "(", "$", "name...
Get the attributes for an input field. @param string $name @param mixed|null $default @return string
[ "Get", "the", "attributes", "for", "an", "input", "field", "." ]
train
https://github.com/CPSB/Validation-helper/blob/adb91cb42b7e3c1f88be059a8b4f86de5aba64cc/src/Form.php#L64-L69
CPSB/Validation-helper
src/Form.php
Form.checkbox
public function checkbox($name, $inputValue = 1, $checkByDefault = false) { $value = $this->value($name); // Define the state for the checkbox, when $value is null then we // use the $checkByDefault value directly, otherwise the checkbox will // be checked only if the $value is equal...
php
public function checkbox($name, $inputValue = 1, $checkByDefault = false) { $value = $this->value($name); // Define the state for the checkbox, when $value is null then we // use the $checkByDefault value directly, otherwise the checkbox will // be checked only if the $value is equal...
[ "public", "function", "checkbox", "(", "$", "name", ",", "$", "inputValue", "=", "1", ",", "$", "checkByDefault", "=", "false", ")", "{", "$", "value", "=", "$", "this", "->", "value", "(", "$", "name", ")", ";", "// Define the state for the checkbox, when...
Get the attributes for a checkbox. @param string $name @param mixed $inputValue @param bool $checkByDefault @return string
[ "Get", "the", "attributes", "for", "a", "checkbox", "." ]
train
https://github.com/CPSB/Validation-helper/blob/adb91cb42b7e3c1f88be059a8b4f86de5aba64cc/src/Form.php#L79-L95
CPSB/Validation-helper
src/Form.php
Form.radio
public function radio($name, $inputValue = 1, $checkByDefault = false) { return $this->checkbox($name, $inputValue, $checkByDefault); }
php
public function radio($name, $inputValue = 1, $checkByDefault = false) { return $this->checkbox($name, $inputValue, $checkByDefault); }
[ "public", "function", "radio", "(", "$", "name", ",", "$", "inputValue", "=", "1", ",", "$", "checkByDefault", "=", "false", ")", "{", "return", "$", "this", "->", "checkbox", "(", "$", "name", ",", "$", "inputValue", ",", "$", "checkByDefault", ")", ...
Get the attributes for a radio. @param string $name @param mixed $inputValue @param bool $checkByDefault @return string
[ "Get", "the", "attributes", "for", "a", "radio", "." ]
train
https://github.com/CPSB/Validation-helper/blob/adb91cb42b7e3c1f88be059a8b4f86de5aba64cc/src/Form.php#L105-L108
CPSB/Validation-helper
src/Form.php
Form.options
public function options($options, $name, $default = null, $placeholder = null) { $tags = []; // Prepend the placeholder to the options list if needed. if ($placeholder) { $tags[] = '<option value="" selected disabled>'.e($placeholder).'</option>'; } $value = $this...
php
public function options($options, $name, $default = null, $placeholder = null) { $tags = []; // Prepend the placeholder to the options list if needed. if ($placeholder) { $tags[] = '<option value="" selected disabled>'.e($placeholder).'</option>'; } $value = $this...
[ "public", "function", "options", "(", "$", "options", ",", "$", "name", ",", "$", "default", "=", "null", ",", "$", "placeholder", "=", "null", ")", "{", "$", "tags", "=", "[", "]", ";", "// Prepend the placeholder to the options list if needed.", "if", "(",...
Get the options for a select. @param array $options @param string $name @param mixed|null $default @param string|null $placeholder @return string
[ "Get", "the", "options", "for", "a", "select", "." ]
train
https://github.com/CPSB/Validation-helper/blob/adb91cb42b7e3c1f88be059a8b4f86de5aba64cc/src/Form.php#L119-L140