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
spiral-modules/auth
source/Auth/Database/Sources/AuthTokenSource.php
AuthTokenSource.findToken
public function findToken(string $token) { /** * @var AuthToken $token */ $token = $this->findOne([ 'token_hash' => hash('sha512', $token) ]); if (!empty($token) && $token->getExpiration() < new \DateTime('now')) { //Token has expired ...
php
public function findToken(string $token) { /** * @var AuthToken $token */ $token = $this->findOne([ 'token_hash' => hash('sha512', $token) ]); if (!empty($token) && $token->getExpiration() < new \DateTime('now')) { //Token has expired ...
[ "public", "function", "findToken", "(", "string", "$", "token", ")", "{", "/**\n * @var AuthToken $token\n */", "$", "token", "=", "$", "this", "->", "findOne", "(", "[", "'token_hash'", "=>", "hash", "(", "'sha512'", ",", "$", "token", ")", "]...
{@inheritdoc}
[ "{" ]
train
https://github.com/spiral-modules/auth/blob/24e2070028f7257e8192914556963a4794428a99/source/Auth/Database/Sources/AuthTokenSource.php#L27-L42
spiral-modules/auth
source/Auth/Database/Sources/AuthTokenSource.php
AuthTokenSource.createToken
public function createToken(UserInterface $user, int $lifetime): TokenInterface { //Base64 encoded random token value $tokenValue = Strings::random(128); /** @var AuthToken $token */ $token = $this->create([ 'user_pk' => $user->primaryKey(), 'token_value'...
php
public function createToken(UserInterface $user, int $lifetime): TokenInterface { //Base64 encoded random token value $tokenValue = Strings::random(128); /** @var AuthToken $token */ $token = $this->create([ 'user_pk' => $user->primaryKey(), 'token_value'...
[ "public", "function", "createToken", "(", "UserInterface", "$", "user", ",", "int", "$", "lifetime", ")", ":", "TokenInterface", "{", "//Base64 encoded random token value", "$", "tokenValue", "=", "Strings", "::", "random", "(", "128", ")", ";", "/** @var AuthToke...
{@inheritdoc}
[ "{" ]
train
https://github.com/spiral-modules/auth/blob/24e2070028f7257e8192914556963a4794428a99/source/Auth/Database/Sources/AuthTokenSource.php#L47-L65
spiral-modules/auth
source/Auth/Database/Sources/AuthTokenSource.php
AuthTokenSource.touchToken
public function touchToken(TokenInterface $token, int $lifetime): bool { if (!$token instanceof AuthToken) { throw new LogicException("Invalid token type, instances of AuthToken are expected"); } $token->touch(); $token->save(); return true; }
php
public function touchToken(TokenInterface $token, int $lifetime): bool { if (!$token instanceof AuthToken) { throw new LogicException("Invalid token type, instances of AuthToken are expected"); } $token->touch(); $token->save(); return true; }
[ "public", "function", "touchToken", "(", "TokenInterface", "$", "token", ",", "int", "$", "lifetime", ")", ":", "bool", "{", "if", "(", "!", "$", "token", "instanceof", "AuthToken", ")", "{", "throw", "new", "LogicException", "(", "\"Invalid token type, instan...
{@inheritdoc}
[ "{" ]
train
https://github.com/spiral-modules/auth/blob/24e2070028f7257e8192914556963a4794428a99/source/Auth/Database/Sources/AuthTokenSource.php#L70-L80
yuncms/framework
src/helpers/AvatarHelper.php
AvatarHelper.saveById
public static function saveById($userId, $originalImage): bool { $user = User::findOne(['id' => $userId]); if ($user) { return self::save($user, $originalImage); } return false; }
php
public static function saveById($userId, $originalImage): bool { $user = User::findOne(['id' => $userId]); if ($user) { return self::save($user, $originalImage); } return false; }
[ "public", "static", "function", "saveById", "(", "$", "userId", ",", "$", "originalImage", ")", ":", "bool", "{", "$", "user", "=", "User", "::", "findOne", "(", "[", "'id'", "=>", "$", "userId", "]", ")", ";", "if", "(", "$", "user", ")", "{", "...
按UID保存用户头像 @param int $userId @param string $originalImage @return bool @throws ErrorException @throws Exception
[ "按UID保存用户头像" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/helpers/AvatarHelper.php#L50-L57
yuncms/framework
src/helpers/AvatarHelper.php
AvatarHelper.save
public static function save(User $user, $originalImage): bool { $avatarPath = AvatarHelper::getAvatarPath($user->id); foreach (self::$avatarSize as $size => $value) { try { $tempFile = Yii::getAlias('@runtime') . DIRECTORY_SEPARATOR . $user->id . '_avatar_' . $size . '.jp...
php
public static function save(User $user, $originalImage): bool { $avatarPath = AvatarHelper::getAvatarPath($user->id); foreach (self::$avatarSize as $size => $value) { try { $tempFile = Yii::getAlias('@runtime') . DIRECTORY_SEPARATOR . $user->id . '_avatar_' . $size . '.jp...
[ "public", "static", "function", "save", "(", "User", "$", "user", ",", "$", "originalImage", ")", ":", "bool", "{", "$", "avatarPath", "=", "AvatarHelper", "::", "getAvatarPath", "(", "$", "user", "->", "id", ")", ";", "foreach", "(", "self", "::", "$"...
从文件保存用户头像 @param User $user @param string $originalImage @return bool @throws ErrorException @throws Exception
[ "从文件保存用户头像" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/helpers/AvatarHelper.php#L67-L88
yuncms/framework
src/helpers/AvatarHelper.php
AvatarHelper.getAvatarById
public static function getAvatarById($userId, $size = self::AVATAR_MIDDLE) { $user = User::findOne(['id' => $userId]); if ($user) { return self::getAvatar($user, $size); } return ''; }
php
public static function getAvatarById($userId, $size = self::AVATAR_MIDDLE) { $user = User::findOne(['id' => $userId]); if ($user) { return self::getAvatar($user, $size); } return ''; }
[ "public", "static", "function", "getAvatarById", "(", "$", "userId", ",", "$", "size", "=", "self", "::", "AVATAR_MIDDLE", ")", "{", "$", "user", "=", "User", "::", "findOne", "(", "[", "'id'", "=>", "$", "userId", "]", ")", ";", "if", "(", "$", "u...
通过UID获取用户头像 @param int $userId @param string $size @return string @throws \OSS\Core\OssException @throws \yii\base\InvalidConfigException
[ "通过UID获取用户头像" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/helpers/AvatarHelper.php#L98-L105
yuncms/framework
src/helpers/AvatarHelper.php
AvatarHelper.getAvatar
public static function getAvatar(User $user, $size = self::AVATAR_MIDDLE) { $size = in_array($size, [self::AVATAR_BIG, self::AVATAR_MIDDLE, self::AVATAR_SMALL]) ? $size : self::AVATAR_BIG; if ($user->getIsAvatar()) { $avatarPath = AvatarHelper::getAvatarPath($user->id) . "_avatar_{$size}...
php
public static function getAvatar(User $user, $size = self::AVATAR_MIDDLE) { $size = in_array($size, [self::AVATAR_BIG, self::AVATAR_MIDDLE, self::AVATAR_SMALL]) ? $size : self::AVATAR_BIG; if ($user->getIsAvatar()) { $avatarPath = AvatarHelper::getAvatarPath($user->id) . "_avatar_{$size}...
[ "public", "static", "function", "getAvatar", "(", "User", "$", "user", ",", "$", "size", "=", "self", "::", "AVATAR_MIDDLE", ")", "{", "$", "size", "=", "in_array", "(", "$", "size", ",", "[", "self", "::", "AVATAR_BIG", ",", "self", "::", "AVATAR_MIDD...
获取头像Url @param User $user @param string $size @return string @throws \OSS\Core\OssException @throws \yii\base\InvalidConfigException
[ "获取头像Url" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/helpers/AvatarHelper.php#L115-L129
yuncms/framework
src/helpers/AvatarHelper.php
AvatarHelper.getAvatarPath
public static function getAvatarPath($userId) { $id = sprintf("%09d", $userId); $dir1 = substr($id, 0, 3); $dir2 = substr($id, 3, 2); $dir3 = substr($id, 5, 2); return 'avatar' . '/' . $dir1 . '/' . $dir2 . '/' . $dir3 . '/' . substr($userId, -2); }
php
public static function getAvatarPath($userId) { $id = sprintf("%09d", $userId); $dir1 = substr($id, 0, 3); $dir2 = substr($id, 3, 2); $dir3 = substr($id, 5, 2); return 'avatar' . '/' . $dir1 . '/' . $dir2 . '/' . $dir3 . '/' . substr($userId, -2); }
[ "public", "static", "function", "getAvatarPath", "(", "$", "userId", ")", "{", "$", "id", "=", "sprintf", "(", "\"%09d\"", ",", "$", "userId", ")", ";", "$", "dir1", "=", "substr", "(", "$", "id", ",", "0", ",", "3", ")", ";", "$", "dir2", "=", ...
计算用户头像子路径 @param int $userId 用户ID @return string
[ "计算用户头像子路径" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/helpers/AvatarHelper.php#L137-L144
nguyenanhung/nusoap
src/nusoap_client.php
nusoap_client.send
function send($msg, $soapaction = '', $timeout = 0, $response_timeout = 30) { $this->checkCookies(); // detect transport switch (TRUE) { // http(s) case preg_match('/^http/', $this->endpoint): $this->debug('transporting via HTTP'); ...
php
function send($msg, $soapaction = '', $timeout = 0, $response_timeout = 30) { $this->checkCookies(); // detect transport switch (TRUE) { // http(s) case preg_match('/^http/', $this->endpoint): $this->debug('transporting via HTTP'); ...
[ "function", "send", "(", "$", "msg", ",", "$", "soapaction", "=", "''", ",", "$", "timeout", "=", "0", ",", "$", "response_timeout", "=", "30", ")", "{", "$", "this", "->", "checkCookies", "(", ")", ";", "// detect transport\r", "switch", "(", "TRUE", ...
send the SOAP message Note: if the operation has multiple return values the return value of this method will be an array of those values. @param string $msg a SOAPx4 soapmsg object @param string $soapaction SOAPAction value @param integer $timeout set connection timeout in seconds @param...
[ "send", "the", "SOAP", "message" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src/nusoap_client.php#L436-L509
nguyenanhung/nusoap
src/nusoap_client.php
nusoap_client.setCookie
function setCookie($name, $value) { if (strlen($name) == 0) { return FALSE; } $this->cookies[] = ['name' => $name, 'value' => $value]; return TRUE; }
php
function setCookie($name, $value) { if (strlen($name) == 0) { return FALSE; } $this->cookies[] = ['name' => $name, 'value' => $value]; return TRUE; }
[ "function", "setCookie", "(", "$", "name", ",", "$", "value", ")", "{", "if", "(", "strlen", "(", "$", "name", ")", "==", "0", ")", "{", "return", "FALSE", ";", "}", "$", "this", "->", "cookies", "[", "]", "=", "[", "'name'", "=>", "$", "name",...
adds a new Cookie into $this->cookies array @param string $name Cookie Name @param string $value Cookie Value @return boolean if cookie-set was successful returns true, else false @access public
[ "adds", "a", "new", "Cookie", "into", "$this", "-", ">", "cookies", "array" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src/nusoap_client.php#L936-L944
nguyenanhung/nusoap
src/nusoap_client.php
nusoap_client.UpdateCookies
function UpdateCookies($cookies) { if (sizeof($this->cookies) == 0) { // no existing cookies: take whatever is new if (sizeof($cookies) > 0) { $this->debug('Setting new cookie(s)'); $this->cookies = $cookies; } return ...
php
function UpdateCookies($cookies) { if (sizeof($this->cookies) == 0) { // no existing cookies: take whatever is new if (sizeof($cookies) > 0) { $this->debug('Setting new cookie(s)'); $this->cookies = $cookies; } return ...
[ "function", "UpdateCookies", "(", "$", "cookies", ")", "{", "if", "(", "sizeof", "(", "$", "this", "->", "cookies", ")", "==", "0", ")", "{", "// no existing cookies: take whatever is new\r", "if", "(", "sizeof", "(", "$", "cookies", ")", ">", "0", ")", ...
updates the current cookies with a new set @param array $cookies new cookies with which to update current ones @return boolean always return true @access private
[ "updates", "the", "current", "cookies", "with", "a", "new", "set" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src/nusoap_client.php#L999-L1058
yuncms/framework
src/user/models/User.php
User.scenarios
public function scenarios() { return ArrayHelper::merge(parent::scenarios(), [ static::SCENARIO_CREATE => ['nickname', 'email', 'password'], static::SCENARIO_UPDATE => ['nickname', 'email', 'password'], static::SCENARIO_REGISTER => ['nickname', 'password'], st...
php
public function scenarios() { return ArrayHelper::merge(parent::scenarios(), [ static::SCENARIO_CREATE => ['nickname', 'email', 'password'], static::SCENARIO_UPDATE => ['nickname', 'email', 'password'], static::SCENARIO_REGISTER => ['nickname', 'password'], st...
[ "public", "function", "scenarios", "(", ")", "{", "return", "ArrayHelper", "::", "merge", "(", "parent", "::", "scenarios", "(", ")", ",", "[", "static", "::", "SCENARIO_CREATE", "=>", "[", "'nickname'", ",", "'email'", ",", "'password'", "]", ",", "static...
定义场景
[ "定义场景" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/models/User.php#L102-L114
yuncms/framework
src/user/models/User.php
User.rules
public function rules() { return ArrayHelper::merge(parent::rules(), [ // nickname rules 'nicknameRequired' => ['nickname', 'required', 'on' => [self::SCENARIO_EMAIL_REGISTER, self::SCENARIO_CONNECT]], // email rules 'emailRequired' => ['email', 'required', 'o...
php
public function rules() { return ArrayHelper::merge(parent::rules(), [ // nickname rules 'nicknameRequired' => ['nickname', 'required', 'on' => [self::SCENARIO_EMAIL_REGISTER, self::SCENARIO_CONNECT]], // email rules 'emailRequired' => ['email', 'required', 'o...
[ "public", "function", "rules", "(", ")", "{", "return", "ArrayHelper", "::", "merge", "(", "parent", "::", "rules", "(", ")", ",", "[", "// nickname rules", "'nicknameRequired'", "=>", "[", "'nickname'", ",", "'required'", ",", "'on'", "=>", "[", "self", "...
验证规则 @return array
[ "验证规则" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/models/User.php#L120-L137
yuncms/framework
src/user/models/User.php
User.getSocialAccounts
public function getSocialAccounts() { $connected = []; /** @var UserSocialAccount[] $accounts */ $accounts = $this->hasMany(UserSocialAccount::class, ['user_id' => 'id'])->all(); /** * @var UserSocialAccount $account */ foreach ($accounts as $account) { ...
php
public function getSocialAccounts() { $connected = []; /** @var UserSocialAccount[] $accounts */ $accounts = $this->hasMany(UserSocialAccount::class, ['user_id' => 'id'])->all(); /** * @var UserSocialAccount $account */ foreach ($accounts as $account) { ...
[ "public", "function", "getSocialAccounts", "(", ")", "{", "$", "connected", "=", "[", "]", ";", "/** @var UserSocialAccount[] $accounts */", "$", "accounts", "=", "$", "this", "->", "hasMany", "(", "UserSocialAccount", "::", "class", ",", "[", "'user_id'", "=>",...
返回所有已经连接的社交媒体账户 @return UserSocialAccount[] Connected accounts ($provider => $account)
[ "返回所有已经连接的社交媒体账户" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/models/User.php#L176-L189
yuncms/framework
src/user/models/User.php
User.increaseTransferBalance
public function increaseTransferBalance($amount) { $this->transfer_balance = bcadd($this->transfer_balance, $amount); if ($this->transfer_balance < 0) {//计算后如果余额小于0,那么结果不合法。 return false; } $transaction = static::getDb()->beginTransaction();//开始事务 try { ...
php
public function increaseTransferBalance($amount) { $this->transfer_balance = bcadd($this->transfer_balance, $amount); if ($this->transfer_balance < 0) {//计算后如果余额小于0,那么结果不合法。 return false; } $transaction = static::getDb()->beginTransaction();//开始事务 try { ...
[ "public", "function", "increaseTransferBalance", "(", "$", "amount", ")", "{", "$", "this", "->", "transfer_balance", "=", "bcadd", "(", "$", "this", "->", "transfer_balance", ",", "$", "amount", ")", ";", "if", "(", "$", "this", "->", "transfer_balance", ...
增加或减少结算金额 @param float $amount @return bool @throws \yii\db\Exception
[ "增加或减少结算金额" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/models/User.php#L360-L383
yuncms/framework
src/user/models/User.php
User.register
public function register() { if ($this->getIsNewRecord() == false) { throw new \RuntimeException('Calling "' . __CLASS__ . '::' . __METHOD__ . '" on existing user'); } $this->password = Yii::$app->settings->get('user.enableGeneratingPassword') ? PasswordHelper::generate(8) : $thi...
php
public function register() { if ($this->getIsNewRecord() == false) { throw new \RuntimeException('Calling "' . __CLASS__ . '::' . __METHOD__ . '" on existing user'); } $this->password = Yii::$app->settings->get('user.enableGeneratingPassword') ? PasswordHelper::generate(8) : $thi...
[ "public", "function", "register", "(", ")", "{", "if", "(", "$", "this", "->", "getIsNewRecord", "(", ")", "==", "false", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "'Calling \"'", ".", "__CLASS__", ".", "'::'", ".", "__METHOD__", ".", "'\"...
此方法用于注册新用户帐户。 如果 enableConfirmation 设置为true,则此方法 将生成新的确认令牌,并使用邮件发送给用户。 @return boolean
[ "此方法用于注册新用户帐户。", "如果", "enableConfirmation", "设置为true,则此方法", "将生成新的确认令牌,并使用邮件发送给用户。" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/models/User.php#L402-L425
yuncms/framework
src/user/models/User.php
User.createUser
public function createUser() { if ($this->getIsNewRecord() == false) { throw new \RuntimeException('Calling "' . __CLASS__ . '::' . __METHOD__ . '" on existing user'); } $this->password = $this->password == null ? PasswordHelper::generate(8) : $this->password; $this->trig...
php
public function createUser() { if ($this->getIsNewRecord() == false) { throw new \RuntimeException('Calling "' . __CLASS__ . '::' . __METHOD__ . '" on existing user'); } $this->password = $this->password == null ? PasswordHelper::generate(8) : $this->password; $this->trig...
[ "public", "function", "createUser", "(", ")", "{", "if", "(", "$", "this", "->", "getIsNewRecord", "(", ")", "==", "false", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "'Calling \"'", ".", "__CLASS__", ".", "'::'", ".", "__METHOD__", ".", "'...
创建新用户帐户。 如果用户不提供密码,则会生成密码。 @return boolean
[ "创建新用户帐户。", "如果用户不提供密码,则会生成密码。" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/models/User.php#L432-L444
yuncms/framework
src/user/models/User.php
User.getNotifications
public function getNotifications() { if ($this instanceof RESTUser) { return $this->hasMany(RESTDatabaseNotification::class, ['notifiable_id' => 'id']) ->onCondition(['notifiable_class' => self::class]) ->addOrderBy(['created_at' => SORT_DESC]); } else { ...
php
public function getNotifications() { if ($this instanceof RESTUser) { return $this->hasMany(RESTDatabaseNotification::class, ['notifiable_id' => 'id']) ->onCondition(['notifiable_class' => self::class]) ->addOrderBy(['created_at' => SORT_DESC]); } else { ...
[ "public", "function", "getNotifications", "(", ")", "{", "if", "(", "$", "this", "instanceof", "RESTUser", ")", "{", "return", "$", "this", "->", "hasMany", "(", "RESTDatabaseNotification", "::", "class", ",", "[", "'notifiable_id'", "=>", "'id'", "]", ")", ...
Get the entity's notifications. @return \yii\db\ActiveQuery
[ "Get", "the", "entity", "s", "notifications", "." ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/models/User.php#L459-L470
zodream/thirdparty
src/ALi/OAuth.php
OAuth.token
public function token($code) { if (!is_array($code)) { $code = [ 'code' => $code, ]; } return $this->getToken()->parameters($code)->text(); }
php
public function token($code) { if (!is_array($code)) { $code = [ 'code' => $code, ]; } return $this->getToken()->parameters($code)->text(); }
[ "public", "function", "token", "(", "$", "code", ")", "{", "if", "(", "!", "is_array", "(", "$", "code", ")", ")", "{", "$", "code", "=", "[", "'code'", "=>", "$", "code", ",", "]", ";", "}", "return", "$", "this", "->", "getToken", "(", ")", ...
获取token @param $code @return mixed @throws \Exception
[ "获取token" ]
train
https://github.com/zodream/thirdparty/blob/b9d39087913850f1c5c7c9165105fec22a128f8f/src/ALi/OAuth.php#L29-L36
whisller/IrcBotBundle
EventListener/Plugins/Commands/DateTimeCommandListener.php
DateTimeCommandListener.onCommand
public function onCommand(BotCommandFoundEvent $event) { $arguments = $event->getArguments(); $timezone = date_default_timezone_get(); if (isset($arguments[0]) && ('' !== trim($arguments[0]))) { if (in_array($arguments[0], \DateTimeZone::listIdentifiers())) { $t...
php
public function onCommand(BotCommandFoundEvent $event) { $arguments = $event->getArguments(); $timezone = date_default_timezone_get(); if (isset($arguments[0]) && ('' !== trim($arguments[0]))) { if (in_array($arguments[0], \DateTimeZone::listIdentifiers())) { $t...
[ "public", "function", "onCommand", "(", "BotCommandFoundEvent", "$", "event", ")", "{", "$", "arguments", "=", "$", "event", "->", "getArguments", "(", ")", ";", "$", "timezone", "=", "date_default_timezone_get", "(", ")", ";", "if", "(", "isset", "(", "$"...
{@inheritdoc}
[ "{" ]
train
https://github.com/whisller/IrcBotBundle/blob/d8bcafc1599cbbc7756b0a59f51ee988a2de0f2e/EventListener/Plugins/Commands/DateTimeCommandListener.php#L17-L32
marcmascarell/arrayer
src/Arrayer.php
Arrayer.arrayDot
protected function arrayDot($array, $prepend = null) { if (function_exists('array_dot')) { return array_dot($array); } $results = []; foreach ($array as $key => $value) { if (is_array($value)) { $results = array_merge($results, $this->arrayDo...
php
protected function arrayDot($array, $prepend = null) { if (function_exists('array_dot')) { return array_dot($array); } $results = []; foreach ($array as $key => $value) { if (is_array($value)) { $results = array_merge($results, $this->arrayDo...
[ "protected", "function", "arrayDot", "(", "$", "array", ",", "$", "prepend", "=", "null", ")", "{", "if", "(", "function_exists", "(", "'array_dot'", ")", ")", "{", "return", "array_dot", "(", "$", "array", ")", ";", "}", "$", "results", "=", "[", "]...
Flatten a multi-dimensional associative array with dots. From Laravel framework. @param array $array @param string $prepend @return array
[ "Flatten", "a", "multi", "-", "dimensional", "associative", "array", "with", "dots", ".", "From", "Laravel", "framework", "." ]
train
https://github.com/marcmascarell/arrayer/blob/7c8e8fa95fd15d8f2f7c6ddf1142aa7d32735b09/src/Arrayer.php#L145-L162
UnionOfRAD/li3_behaviors
data/model/Behavior.php
Behavior.config
public function config($key = null, $value = null) { if (is_array($key)) { return $this->_config = $key + $this->_config; } if ($key === null) { return $this->_config; } if ($value !== null) { return $this->_config[$key] = $value; } return isset($this->_config[$key]) ? $this->_config[$key] : null...
php
public function config($key = null, $value = null) { if (is_array($key)) { return $this->_config = $key + $this->_config; } if ($key === null) { return $this->_config; } if ($value !== null) { return $this->_config[$key] = $value; } return isset($this->_config[$key]) ? $this->_config[$key] : null...
[ "public", "function", "config", "(", "$", "key", "=", "null", ",", "$", "value", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "key", ")", ")", "{", "return", "$", "this", "->", "_config", "=", "$", "key", "+", "$", "this", "->", "_co...
Gets/sets the configuration, allows for introspecting and changing behavior configuration. @param string|array $key A configuration key or if `null` (default) returns whole configuration. If array will merge config values with existing. @param mixed $value Configuration value if `null` (default) will return $key. @ret...
[ "Gets", "/", "sets", "the", "configuration", "allows", "for", "introspecting", "and", "changing", "behavior", "configuration", "." ]
train
https://github.com/UnionOfRAD/li3_behaviors/blob/b7051a300f91323f8776088b20e84c79790015ea/data/model/Behavior.php#L170-L181
andrelohmann/silverstripe-geolocation
code/defaults/AddGeodistanceFunction.php
AddGeodistanceFunction.requireDefaultRecords
public function requireDefaultRecords() { parent::requireDefaultRecords(); if(defined('CREATE_GEODISTANCE_UDF') && GEOFORM_CREATE_GEODISTANCE_UDF){ if(!defined('CreateGeodistanceOnce')){ define('CreateGeodistanceOnce', true); $q1 = "DROP FUNCTION IF ...
php
public function requireDefaultRecords() { parent::requireDefaultRecords(); if(defined('CREATE_GEODISTANCE_UDF') && GEOFORM_CREATE_GEODISTANCE_UDF){ if(!defined('CreateGeodistanceOnce')){ define('CreateGeodistanceOnce', true); $q1 = "DROP FUNCTION IF ...
[ "public", "function", "requireDefaultRecords", "(", ")", "{", "parent", "::", "requireDefaultRecords", "(", ")", ";", "if", "(", "defined", "(", "'CREATE_GEODISTANCE_UDF'", ")", "&&", "GEOFORM_CREATE_GEODISTANCE_UDF", ")", "{", "if", "(", "!", "defined", "(", "'...
Set Default Frontend group for new members
[ "Set", "Default", "Frontend", "group", "for", "new", "members" ]
train
https://github.com/andrelohmann/silverstripe-geolocation/blob/124062008d8fa25b631bf5bb69b2ca79b53ef81b/code/defaults/AddGeodistanceFunction.php#L9-L44
alanpich/slender
src/Core/ConfigParser/Stack.php
Stack.parseFile
public function parseFile($path) { // Check file exists if (!is_readable((string) $path)) { throw new ConfigFileNotFoundException("$path does not exist, or is not readable"); } $extension = pathinfo($path,PATHINFO_EXTENSION); if (isset($this->parsers[$extension])...
php
public function parseFile($path) { // Check file exists if (!is_readable((string) $path)) { throw new ConfigFileNotFoundException("$path does not exist, or is not readable"); } $extension = pathinfo($path,PATHINFO_EXTENSION); if (isset($this->parsers[$extension])...
[ "public", "function", "parseFile", "(", "$", "path", ")", "{", "// Check file exists", "if", "(", "!", "is_readable", "(", "(", "string", ")", "$", "path", ")", ")", "{", "throw", "new", "ConfigFileNotFoundException", "(", "\"$path does not exist, or is not readab...
Parse $path and return array of config from within @param string $path Path to file @throws \Slender\Exception\ConfigFileFormatException when unable to parse file @throws \Slender\Exception\ConfigFileNotFoundException when $path does not exist @return array
[ "Parse", "$path", "and", "return", "array", "of", "config", "from", "within" ]
train
https://github.com/alanpich/slender/blob/247f5c08af20cda95b116eb5d9f6f623d61e8a8a/src/Core/ConfigParser/Stack.php#L60-L73
devture/dbal
src/Devture/Component/DBAL/Repository/EavSqlRepository.php
EavSqlRepository.findAllByQuery
public function findAllByQuery($query, array $params = array()) { //Not using the parent findAllByQuery() implementation, becaus //it performs one-by-one EAV fetching, which is very bad for performance. //Instead, we find all main records with 1 query. And then fine all EAV entries (for all), //with a single ad...
php
public function findAllByQuery($query, array $params = array()) { //Not using the parent findAllByQuery() implementation, becaus //it performs one-by-one EAV fetching, which is very bad for performance. //Instead, we find all main records with 1 query. And then fine all EAV entries (for all), //with a single ad...
[ "public", "function", "findAllByQuery", "(", "$", "query", ",", "array", "$", "params", "=", "array", "(", ")", ")", "{", "//Not using the parent findAllByQuery() implementation, becaus", "//it performs one-by-one EAV fetching, which is very bad for performance.", "//Instead, we ...
{@inheritDoc} @see \Devture\Component\DBAL\Repository\BaseSqlRepository::findAllByQuery()
[ "{" ]
train
https://github.com/devture/dbal/blob/e2538d13baf9220fc388a48596acd176cd2bb42f/src/Devture/Component/DBAL/Repository/EavSqlRepository.php#L111-L133
ARCANEDEV/Sanitizer
src/Entities/Rules.php
Rules.set
public function set(array $rules) { $this->items = array_merge( $this->items, $this->parseRules($rules) ); return $this; }
php
public function set(array $rules) { $this->items = array_merge( $this->items, $this->parseRules($rules) ); return $this; }
[ "public", "function", "set", "(", "array", "$", "rules", ")", "{", "$", "this", "->", "items", "=", "array_merge", "(", "$", "this", "->", "items", ",", "$", "this", "->", "parseRules", "(", "$", "rules", ")", ")", ";", "return", "$", "this", ";", ...
Set multiple rules. @param array $rules @return $this
[ "Set", "multiple", "rules", "." ]
train
https://github.com/ARCANEDEV/Sanitizer/blob/e21990ce6d881366d52a7f4e5040b07cc3ecca96/src/Entities/Rules.php#L43-L51
ARCANEDEV/Sanitizer
src/Entities/Rules.php
Rules.parseRules
protected function parseRules(array $rules) { $parsedRules = []; foreach ($rules as $attribute => $filters) { if (empty($filters)) { throw new InvalidFilterException( "The attribute [$attribute] must contain at least one filter." ); ...
php
protected function parseRules(array $rules) { $parsedRules = []; foreach ($rules as $attribute => $filters) { if (empty($filters)) { throw new InvalidFilterException( "The attribute [$attribute] must contain at least one filter." ); ...
[ "protected", "function", "parseRules", "(", "array", "$", "rules", ")", "{", "$", "parsedRules", "=", "[", "]", ";", "foreach", "(", "$", "rules", "as", "$", "attribute", "=>", "$", "filters", ")", "{", "if", "(", "empty", "(", "$", "filters", ")", ...
Parse a rules array. @param array $rules @return array @throws \Arcanedev\Sanitizer\Exceptions\InvalidFilterException
[ "Parse", "a", "rules", "array", "." ]
train
https://github.com/ARCANEDEV/Sanitizer/blob/e21990ce6d881366d52a7f4e5040b07cc3ecca96/src/Entities/Rules.php#L90-L105
ARCANEDEV/Sanitizer
src/Entities/Rules.php
Rules.parseAttributeFilters
protected function parseAttributeFilters(array &$parsedRules, $attribute, $filters) { foreach (explode('|', $filters) as $filter) { $parsedFilter = $this->parseRule($filter); if ( ! empty($parsedFilter)) { $parsedRules[$attribute][] = $parsedFilter; } ...
php
protected function parseAttributeFilters(array &$parsedRules, $attribute, $filters) { foreach (explode('|', $filters) as $filter) { $parsedFilter = $this->parseRule($filter); if ( ! empty($parsedFilter)) { $parsedRules[$attribute][] = $parsedFilter; } ...
[ "protected", "function", "parseAttributeFilters", "(", "array", "&", "$", "parsedRules", ",", "$", "attribute", ",", "$", "filters", ")", "{", "foreach", "(", "explode", "(", "'|'", ",", "$", "filters", ")", "as", "$", "filter", ")", "{", "$", "parsedFil...
Parse attribute's filters. @param array $parsedRules @param string $attribute @param string $filters
[ "Parse", "attribute", "s", "filters", "." ]
train
https://github.com/ARCANEDEV/Sanitizer/blob/e21990ce6d881366d52a7f4e5040b07cc3ecca96/src/Entities/Rules.php#L114-L123
ARCANEDEV/Sanitizer
src/Entities/Rules.php
Rules.parseRule
protected function parseRule($rule) { $name = $rule; $options = []; if (str_contains($rule, ':')) { list($name, $options) = explode(':', $rule, 2); $options = array_map('trim', explode(',', $options)); } return empty($name) ? [] : com...
php
protected function parseRule($rule) { $name = $rule; $options = []; if (str_contains($rule, ':')) { list($name, $options) = explode(':', $rule, 2); $options = array_map('trim', explode(',', $options)); } return empty($name) ? [] : com...
[ "protected", "function", "parseRule", "(", "$", "rule", ")", "{", "$", "name", "=", "$", "rule", ";", "$", "options", "=", "[", "]", ";", "if", "(", "str_contains", "(", "$", "rule", ",", "':'", ")", ")", "{", "list", "(", "$", "name", ",", "$"...
Parse a rule. @param string $rule @return array
[ "Parse", "a", "rule", "." ]
train
https://github.com/ARCANEDEV/Sanitizer/blob/e21990ce6d881366d52a7f4e5040b07cc3ecca96/src/Entities/Rules.php#L132-L143
Chill-project/Main
Routing/MenuTwig.php
MenuTwig.chillMenu
public function chillMenu($menuId, array $params = array()) { $resolvedParams = array_merge($this->defaultParams, $params); $layout = $resolvedParams['layout']; unset($resolvedParams['layout']); $resolvedParams['routes'] = $this->menuComposer->getRoutesFor($menuId); ...
php
public function chillMenu($menuId, array $params = array()) { $resolvedParams = array_merge($this->defaultParams, $params); $layout = $resolvedParams['layout']; unset($resolvedParams['layout']); $resolvedParams['routes'] = $this->menuComposer->getRoutesFor($menuId); ...
[ "public", "function", "chillMenu", "(", "$", "menuId", ",", "array", "$", "params", "=", "array", "(", ")", ")", "{", "$", "resolvedParams", "=", "array_merge", "(", "$", "this", "->", "defaultParams", ",", "$", "params", ")", ";", "$", "layout", "=", ...
Render a Menu corresponding to $menuId Expected params : - args: the arguments to build the path (i.e: if pattern is /something/{bar}, args must contain {'bar': 'foo'} - layout: the layout. Absolute path needed (i.e.: ChillXyzBundle:section:foo.html.twig) - activeRouteKey : the key active, will render the menu differe...
[ "Render", "a", "Menu", "corresponding", "to", "$menuId" ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Routing/MenuTwig.php#L84-L95
ixocreate/application
src/Http/ErrorHandling/Factory/WhoopsFactory.php
WhoopsFactory.registerJsonHandler
private function registerJsonHandler(Whoops $whoops, $config) : void { if (empty($config['json_exceptions']['display'])) { return; } $handler = new JsonResponseHandler(); if (! empty($config['json_exceptions']['show_trace'])) { $handler->addTraceToOutput(tru...
php
private function registerJsonHandler(Whoops $whoops, $config) : void { if (empty($config['json_exceptions']['display'])) { return; } $handler = new JsonResponseHandler(); if (! empty($config['json_exceptions']['show_trace'])) { $handler->addTraceToOutput(tru...
[ "private", "function", "registerJsonHandler", "(", "Whoops", "$", "whoops", ",", "$", "config", ")", ":", "void", "{", "if", "(", "empty", "(", "$", "config", "[", "'json_exceptions'", "]", "[", "'display'", "]", ")", ")", "{", "return", ";", "}", "$",...
If configuration indicates a JsonResponseHandler, configure and register it. @param Whoops $whoops @param array|\ArrayAccess $config @return void
[ "If", "configuration", "indicates", "a", "JsonResponseHandler", "configure", "and", "register", "it", "." ]
train
https://github.com/ixocreate/application/blob/6b0ef355ecf96af63d0dd5b901b4c9a5a69daf05/src/Http/ErrorHandling/Factory/WhoopsFactory.php#L54-L80
atkrad/data-tables
src/ArrayAccessTrait.php
ArrayAccessTrait.offsetGet
public function offsetGet($offset) { if (array_key_exists($offset, $this->properties)) { return $this->properties[$offset]; } else { return $this->properties; } }
php
public function offsetGet($offset) { if (array_key_exists($offset, $this->properties)) { return $this->properties[$offset]; } else { return $this->properties; } }
[ "public", "function", "offsetGet", "(", "$", "offset", ")", "{", "if", "(", "array_key_exists", "(", "$", "offset", ",", "$", "this", "->", "properties", ")", ")", "{", "return", "$", "this", "->", "properties", "[", "$", "offset", "]", ";", "}", "el...
Offset to retrieve @param mixed $offset The offset to retrieve. @return mixed Can return all value types. @link http://php.net/manual/en/arrayaccess.offsetget.php
[ "Offset", "to", "retrieve" ]
train
https://github.com/atkrad/data-tables/blob/5afcc337ab624ca626e29d9674459c5105982b16/src/ArrayAccessTrait.php#L34-L41
redaigbaria/oauth2
src/Entity/EntityTrait.php
EntityTrait.hydrate
public function hydrate(array $properties) { foreach ($properties as $prop => $val) { if (property_exists($this, $prop)) { $this->{$prop} = $val; } } return $this; }
php
public function hydrate(array $properties) { foreach ($properties as $prop => $val) { if (property_exists($this, $prop)) { $this->{$prop} = $val; } } return $this; }
[ "public", "function", "hydrate", "(", "array", "$", "properties", ")", "{", "foreach", "(", "$", "properties", "as", "$", "prop", "=>", "$", "val", ")", "{", "if", "(", "property_exists", "(", "$", "this", ",", "$", "prop", ")", ")", "{", "$", "thi...
Hydrate an entity with properites @param array $properties @return self
[ "Hydrate", "an", "entity", "with", "properites" ]
train
https://github.com/redaigbaria/oauth2/blob/54cca4aaaff6a095cbf1c8010f2fe2cc7de4e45a/src/Entity/EntityTrait.php#L23-L32
webforge-labs/psc-cms
lib/Psc/Graph/Alg.php
Alg.BFS
public static function BFS(Graph $g, BFSVertice $s) { if (!$g->has($s)) throw new Exception('Startknoten '.$s.' ist nicht im Graphen g vorhanden'); foreach($g->V() as $vertice) { $vertice->color = 'weiss'; $vertice->d = PHP_INT_MAX; $vertice->parent = NULL; } $s->color = 'grau'; ...
php
public static function BFS(Graph $g, BFSVertice $s) { if (!$g->has($s)) throw new Exception('Startknoten '.$s.' ist nicht im Graphen g vorhanden'); foreach($g->V() as $vertice) { $vertice->color = 'weiss'; $vertice->d = PHP_INT_MAX; $vertice->parent = NULL; } $s->color = 'grau'; ...
[ "public", "static", "function", "BFS", "(", "Graph", "$", "g", ",", "BFSVertice", "$", "s", ")", "{", "if", "(", "!", "$", "g", "->", "has", "(", "$", "s", ")", ")", "throw", "new", "Exception", "(", "'Startknoten '", ".", "$", "s", ".", "' ist n...
Breitensuche Algorithmus aus C. Cormen / E. Leiserson / R. Rivest / C. Stein: Algorithmen - Eine Einführung @param Graph $g der Graph sollte nur aus GraphBFSVertice bestehen (das ist selber zu überprüfen aus Performancegründen) @param GraphBFSVertice $s der Startknoten
[ "Breitensuche" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Graph/Alg.php#L14-L42
webforge-labs/psc-cms
lib/Psc/Graph/Alg.php
Alg.TopologicalSort
public static function TopologicalSort(Graph $g) { $list = array(); if (count($g->V()) == 0) return $list; // rufe DFS auf $g auf // füge jeden abgearbeiteten Knoten an den Kopf einer Liste ein $dfsVisit = function (DependencyVertice $vertice) use ($g, &$list, &$dfsVisit) { if (!$ver...
php
public static function TopologicalSort(Graph $g) { $list = array(); if (count($g->V()) == 0) return $list; // rufe DFS auf $g auf // füge jeden abgearbeiteten Knoten an den Kopf einer Liste ein $dfsVisit = function (DependencyVertice $vertice) use ($g, &$list, &$dfsVisit) { if (!$ver...
[ "public", "static", "function", "TopologicalSort", "(", "Graph", "$", "g", ")", "{", "$", "list", "=", "array", "(", ")", ";", "if", "(", "count", "(", "$", "g", "->", "V", "(", ")", ")", "==", "0", ")", "return", "$", "list", ";", "// rufe DFS a...
Der Graph muss aus DependencyVertices bestehen die besonderen Knoten brauchen wir, da wir "hasOutgoingEdges()" nicht ganz easy berechnen können (wir bräuchten die EdgesList flipped) Cormen, Thomas H.; Leiserson, Charles E.; Rivest, Ronald L.; Stein, Clifford (2001), "Section 22.4: Topological sort", Introduction to A...
[ "Der", "Graph", "muss", "aus", "DependencyVertices", "bestehen" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Graph/Alg.php#L57-L89
jfusion/org.jfusion.framework
src/User/Groups.php
Groups.get
public static function get($jname = '', $default = false) { if (!isset($groups)) { $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('value') ->from('#__jfusion_settings') ->where($db->quoteName('key') . ' = ' . $db->quote('user.groups')); $db->setQuery($query); $groups = $db->l...
php
public static function get($jname = '', $default = false) { if (!isset($groups)) { $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('value') ->from('#__jfusion_settings') ->where($db->quoteName('key') . ' = ' . $db->quote('user.groups')); $db->setQuery($query); $groups = $db->l...
[ "public", "static", "function", "get", "(", "$", "jname", "=", "''", ",", "$", "default", "=", "false", ")", "{", "if", "(", "!", "isset", "(", "$", "groups", ")", ")", "{", "$", "db", "=", "Factory", "::", "getDbo", "(", ")", ";", "$", "query"...
@param string $jname @param bool $default @return mixed;
[ "@param", "string", "$jname", "@param", "bool", "$default" ]
train
https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/User/Groups.php#L36-L79
jfusion/org.jfusion.framework
src/User/Groups.php
Groups.isUpdate
public static function isUpdate($jname) { $updateusergroups = static::getUpdate(); $advanced = false; if (isset($updateusergroups->{$jname}) && $updateusergroups->{$jname}) { $master = Framework::getMaster(); if ($master && $master->name != $jname) { $advanced = true; } } return $advanced; }
php
public static function isUpdate($jname) { $updateusergroups = static::getUpdate(); $advanced = false; if (isset($updateusergroups->{$jname}) && $updateusergroups->{$jname}) { $master = Framework::getMaster(); if ($master && $master->name != $jname) { $advanced = true; } } return $advanced; }
[ "public", "static", "function", "isUpdate", "(", "$", "jname", ")", "{", "$", "updateusergroups", "=", "static", "::", "getUpdate", "(", ")", ";", "$", "advanced", "=", "false", ";", "if", "(", "isset", "(", "$", "updateusergroups", "->", "{", "$", "jn...
returns true / false if the plugin is in advanced usergroup mode or not... @param string $jname plugin name @return boolean
[ "returns", "true", "/", "false", "if", "the", "plugin", "is", "in", "advanced", "usergroup", "mode", "or", "not", "..." ]
train
https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/User/Groups.php#L157-L167
shrink0r/workflux
src/Builder/Factory.php
Factory.createState
public function createState(string $name, array $state = null): StateInterface { $state = Maybe::unit($state); $state_implementor = $this->resolveStateImplementor($state); $settings = $state->settings->get() ?? []; $settings['_output'] = $state->output->get() ?? []; $state_in...
php
public function createState(string $name, array $state = null): StateInterface { $state = Maybe::unit($state); $state_implementor = $this->resolveStateImplementor($state); $settings = $state->settings->get() ?? []; $settings['_output'] = $state->output->get() ?? []; $state_in...
[ "public", "function", "createState", "(", "string", "$", "name", ",", "array", "$", "state", "=", "null", ")", ":", "StateInterface", "{", "$", "state", "=", "Maybe", "::", "unit", "(", "$", "state", ")", ";", "$", "state_implementor", "=", "$", "this"...
@param string $name @param mixed[]|null $state @return StateInterface
[ "@param", "string", "$name", "@param", "mixed", "[]", "|null", "$state" ]
train
https://github.com/shrink0r/workflux/blob/008f45c64f52b1f795ab7f6ddbfc1a55580254d9/src/Builder/Factory.php#L68-L92
shrink0r/workflux
src/Builder/Factory.php
Factory.createTransition
public function createTransition(string $from, string $to, array $config = null): TransitionInterface { $transition = Maybe::unit($config); if (is_string($transition->when->get())) { $config['when'] = [ $transition->when->get() ]; } $implementor = $transition->class->get(...
php
public function createTransition(string $from, string $to, array $config = null): TransitionInterface { $transition = Maybe::unit($config); if (is_string($transition->when->get())) { $config['when'] = [ $transition->when->get() ]; } $implementor = $transition->class->get(...
[ "public", "function", "createTransition", "(", "string", "$", "from", ",", "string", "$", "to", ",", "array", "$", "config", "=", "null", ")", ":", "TransitionInterface", "{", "$", "transition", "=", "Maybe", "::", "unit", "(", "$", "config", ")", ";", ...
@param string $from @param string $to @param mixed[]|null $transition @return TransitionInterface
[ "@param", "string", "$from", "@param", "string", "$to", "@param", "mixed", "[]", "|null", "$transition" ]
train
https://github.com/shrink0r/workflux/blob/008f45c64f52b1f795ab7f6ddbfc1a55580254d9/src/Builder/Factory.php#L101-L122
shrink0r/workflux
src/Builder/Factory.php
Factory.resolveStateImplementor
private function resolveStateImplementor(Maybe $state): string { switch (true) { case $state->initial->get(): $state_implementor = $this->class_map->get('initial'); break; case $state->final->get() === true || $state->get() === null: // cast null to fi...
php
private function resolveStateImplementor(Maybe $state): string { switch (true) { case $state->initial->get(): $state_implementor = $this->class_map->get('initial'); break; case $state->final->get() === true || $state->get() === null: // cast null to fi...
[ "private", "function", "resolveStateImplementor", "(", "Maybe", "$", "state", ")", ":", "string", "{", "switch", "(", "true", ")", "{", "case", "$", "state", "->", "initial", "->", "get", "(", ")", ":", "$", "state_implementor", "=", "$", "this", "->", ...
@param Maybe $state @return string
[ "@param", "Maybe", "$state" ]
train
https://github.com/shrink0r/workflux/blob/008f45c64f52b1f795ab7f6ddbfc1a55580254d9/src/Builder/Factory.php#L129-L151
shrink0r/workflux
src/Builder/Factory.php
Factory.createValidator
private function createValidator(string $name, Maybe $state): ValidatorInterface { return new Validator( $this->createValidationSchema( $name.self::SUFFIX_IN, $state->input_schema->get() ?? self::$default_validation_schema ), $this->createV...
php
private function createValidator(string $name, Maybe $state): ValidatorInterface { return new Validator( $this->createValidationSchema( $name.self::SUFFIX_IN, $state->input_schema->get() ?? self::$default_validation_schema ), $this->createV...
[ "private", "function", "createValidator", "(", "string", "$", "name", ",", "Maybe", "$", "state", ")", ":", "ValidatorInterface", "{", "return", "new", "Validator", "(", "$", "this", "->", "createValidationSchema", "(", "$", "name", ".", "self", "::", "SUFFI...
@param string $name @param Maybe $state @return ValidatorInterface
[ "@param", "string", "$name", "@param", "Maybe", "$state" ]
train
https://github.com/shrink0r/workflux/blob/008f45c64f52b1f795ab7f6ddbfc1a55580254d9/src/Builder/Factory.php#L159-L171
yuncms/framework
src/sms/Messenger.php
Messenger.send
public function send($to, $message, array $gateways = []) { $message = $this->formatMessage($message); if (empty($gateways)) { $gateways = $message->getGateways(); } if (empty($gateways)) { $gateways = $this->sms->defaultGateway; } $strategyApp...
php
public function send($to, $message, array $gateways = []) { $message = $this->formatMessage($message); if (empty($gateways)) { $gateways = $message->getGateways(); } if (empty($gateways)) { $gateways = $this->sms->defaultGateway; } $strategyApp...
[ "public", "function", "send", "(", "$", "to", ",", "$", "message", ",", "array", "$", "gateways", "=", "[", "]", ")", "{", "$", "message", "=", "$", "this", "->", "formatMessage", "(", "$", "message", ")", ";", "if", "(", "empty", "(", "$", "gate...
Send a message. @param string|array $to @param string|array|MessageInterface $message @param array $gateways @return array @throws InvalidArgumentException @throws NoGatewayAvailableException @throws \yii\base\InvalidConfigException
[ "Send", "a", "message", "." ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/sms/Messenger.php#L52-L84
titon/db
src/Titon/Db/Query/Join.php
Join.fields
public function fields($fields) { if (!is_array($fields)) { $fields = func_get_args(); } $this->_fields = $fields; return $this; }
php
public function fields($fields) { if (!is_array($fields)) { $fields = func_get_args(); } $this->_fields = $fields; return $this; }
[ "public", "function", "fields", "(", "$", "fields", ")", "{", "if", "(", "!", "is_array", "(", "$", "fields", ")", ")", "{", "$", "fields", "=", "func_get_args", "(", ")", ";", "}", "$", "this", "->", "_fields", "=", "$", "fields", ";", "return", ...
Set the list of fields to return. @param string|array $fields @return $this
[ "Set", "the", "list", "of", "fields", "to", "return", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Join.php#L74-L82
titon/db
src/Titon/Db/Query/Join.php
Join.from
public function from($table, $alias = null) { $this->_table = (string) $table; $this->asAlias($alias); return $this; }
php
public function from($table, $alias = null) { $this->_table = (string) $table; $this->asAlias($alias); return $this; }
[ "public", "function", "from", "(", "$", "table", ",", "$", "alias", "=", "null", ")", "{", "$", "this", "->", "_table", "=", "(", "string", ")", "$", "table", ";", "$", "this", "->", "asAlias", "(", "$", "alias", ")", ";", "return", "$", "this", ...
Set the table to join against. @param string $table @param string $alias @return $this
[ "Set", "the", "table", "to", "join", "against", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Join.php#L91-L96
titon/db
src/Titon/Db/Query/Join.php
Join.on
public function on($foreignKey, $key = null) { if (is_array($foreignKey)) { $this->_conditions = array_replace($this->_conditions, $foreignKey); } else { $this->_conditions[$foreignKey] = $key; } return $this; }
php
public function on($foreignKey, $key = null) { if (is_array($foreignKey)) { $this->_conditions = array_replace($this->_conditions, $foreignKey); } else { $this->_conditions[$foreignKey] = $key; } return $this; }
[ "public", "function", "on", "(", "$", "foreignKey", ",", "$", "key", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "foreignKey", ")", ")", "{", "$", "this", "->", "_conditions", "=", "array_replace", "(", "$", "this", "->", "_conditions", "...
Set the conditions to join on. @param string $foreignKey @param string $key @return $this
[ "Set", "the", "conditions", "to", "join", "on", "." ]
train
https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Join.php#L141-L149
Lansoweb/LosReCaptcha
src/ConfigProvider.php
ConfigProvider.getViewHelperConfig
public function getViewHelperConfig() { return [ 'aliases' => [ 'losrecaptcha/recaptcha' => Form\View\Helper\Captcha\ReCaptcha::class, 'losrecaptcha/invisible' => Form\View\Helper\Captcha\Invisible::class, ], 'factories' => [ ...
php
public function getViewHelperConfig() { return [ 'aliases' => [ 'losrecaptcha/recaptcha' => Form\View\Helper\Captcha\ReCaptcha::class, 'losrecaptcha/invisible' => Form\View\Helper\Captcha\Invisible::class, ], 'factories' => [ ...
[ "public", "function", "getViewHelperConfig", "(", ")", "{", "return", "[", "'aliases'", "=>", "[", "'losrecaptcha/recaptcha'", "=>", "Form", "\\", "View", "\\", "Helper", "\\", "Captcha", "\\", "ReCaptcha", "::", "class", ",", "'losrecaptcha/invisible'", "=>", "...
Return zend-view helper configuration. @return array
[ "Return", "zend", "-", "view", "helper", "configuration", "." ]
train
https://github.com/Lansoweb/LosReCaptcha/blob/8df866995501db087c3850f97fd2b6547632e6ed/src/ConfigProvider.php#L23-L35
AndreyKluev/yii2-shop-basket
models/SessionBasket.php
SessionBasket.loadProducts
public function loadProducts() { $this->basketProducts = Yii::$app->session->get($this->owner->storageName, []); }
php
public function loadProducts() { $this->basketProducts = Yii::$app->session->get($this->owner->storageName, []); }
[ "public", "function", "loadProducts", "(", ")", "{", "$", "this", "->", "basketProducts", "=", "Yii", "::", "$", "app", "->", "session", "->", "get", "(", "$", "this", "->", "owner", "->", "storageName", ",", "[", "]", ")", ";", "}" ]
Загружает товары из сессии
[ "Загружает", "товары", "из", "сессии" ]
train
https://github.com/AndreyKluev/yii2-shop-basket/blob/3bc529fd576a18403096f911112d5337cb5b1069/models/SessionBasket.php#L31-L34
AndreyKluev/yii2-shop-basket
models/SessionBasket.php
SessionBasket.insertProduct
public function insertProduct($hash, $pid, $price, $params=[], $count=1) { $this->loadProducts(); if(!$this->isProductInBasket($hash)) { $this->basketProducts[$hash] = [ 'count' => $count, 'id_product' => $pid, 'price' => $price, ...
php
public function insertProduct($hash, $pid, $price, $params=[], $count=1) { $this->loadProducts(); if(!$this->isProductInBasket($hash)) { $this->basketProducts[$hash] = [ 'count' => $count, 'id_product' => $pid, 'price' => $price, ...
[ "public", "function", "insertProduct", "(", "$", "hash", ",", "$", "pid", ",", "$", "price", ",", "$", "params", "=", "[", "]", ",", "$", "count", "=", "1", ")", "{", "$", "this", "->", "loadProducts", "(", ")", ";", "if", "(", "!", "$", "this"...
Добавляет товар в корзину @param $hash - уникальный Хэш товара @param $pid - id товара @param $price - цена товара @param $params - дополнительные параметры товара @param $count - количество @return array @throws HttpException @throws \yii\base\InvalidParamException @throws \yii\base\InvalidConfigException
[ "Добавляет", "товар", "в", "корзину" ]
train
https://github.com/AndreyKluev/yii2-shop-basket/blob/3bc529fd576a18403096f911112d5337cb5b1069/models/SessionBasket.php#L58-L100
AndreyKluev/yii2-shop-basket
models/SessionBasket.php
SessionBasket.getBasketProducts
public function getBasketProducts() { $this->loadProducts(); return array_map( function($item) { $item['params'] = Json::decode($item['params']); return $item; }, $this->basketProducts ); }
php
public function getBasketProducts() { $this->loadProducts(); return array_map( function($item) { $item['params'] = Json::decode($item['params']); return $item; }, $this->basketProducts ); }
[ "public", "function", "getBasketProducts", "(", ")", "{", "$", "this", "->", "loadProducts", "(", ")", ";", "return", "array_map", "(", "function", "(", "$", "item", ")", "{", "$", "item", "[", "'params'", "]", "=", "Json", "::", "decode", "(", "$", ...
Возвращает список товаров в корзине @return array @throws \yii\base\InvalidParamException
[ "Возвращает", "список", "товаров", "в", "корзине" ]
train
https://github.com/AndreyKluev/yii2-shop-basket/blob/3bc529fd576a18403096f911112d5337cb5b1069/models/SessionBasket.php#L107-L117
AndreyKluev/yii2-shop-basket
models/SessionBasket.php
SessionBasket.getBasketTotal
public function getBasketTotal() { $this->loadProducts(); $total = 0; foreach($this->basketProducts as $bp) { $total += $bp['count']; } return $total; }
php
public function getBasketTotal() { $this->loadProducts(); $total = 0; foreach($this->basketProducts as $bp) { $total += $bp['count']; } return $total; }
[ "public", "function", "getBasketTotal", "(", ")", "{", "$", "this", "->", "loadProducts", "(", ")", ";", "$", "total", "=", "0", ";", "foreach", "(", "$", "this", "->", "basketProducts", "as", "$", "bp", ")", "{", "$", "total", "+=", "$", "bp", "["...
Возвращает количество единиц товаров в корзине @return int
[ "Возвращает", "количество", "единиц", "товаров", "в", "корзине" ]
train
https://github.com/AndreyKluev/yii2-shop-basket/blob/3bc529fd576a18403096f911112d5337cb5b1069/models/SessionBasket.php#L150-L160
AndreyKluev/yii2-shop-basket
models/SessionBasket.php
SessionBasket.getBasketCost
public function getBasketCost() { $this->loadProducts(); $cost = 0; foreach($this->basketProducts as $bp) { $cost += $bp['count'] * $bp['price']; } return $cost; }
php
public function getBasketCost() { $this->loadProducts(); $cost = 0; foreach($this->basketProducts as $bp) { $cost += $bp['count'] * $bp['price']; } return $cost; }
[ "public", "function", "getBasketCost", "(", ")", "{", "$", "this", "->", "loadProducts", "(", ")", ";", "$", "cost", "=", "0", ";", "foreach", "(", "$", "this", "->", "basketProducts", "as", "$", "bp", ")", "{", "$", "cost", "+=", "$", "bp", "[", ...
Возвращает сумму товаров в корзине @return float
[ "Возвращает", "сумму", "товаров", "в", "корзине" ]
train
https://github.com/AndreyKluev/yii2-shop-basket/blob/3bc529fd576a18403096f911112d5337cb5b1069/models/SessionBasket.php#L166-L176
nexusnetsoftgmbh/nexuscli
src/Nexus/DynamicModules/Business/Model/Hydrator/CommandHydrator.php
CommandHydrator.hydrateCommands
public function hydrateCommands(array $commands) : array { $modulesDone = []; foreach ($this->finder->getModuleList() as $module) { $moduleName = basename($module); if (!\in_array($moduleName, $modulesDone, true)) { $facade = Locator::getInstance()->{$module...
php
public function hydrateCommands(array $commands) : array { $modulesDone = []; foreach ($this->finder->getModuleList() as $module) { $moduleName = basename($module); if (!\in_array($moduleName, $modulesDone, true)) { $facade = Locator::getInstance()->{$module...
[ "public", "function", "hydrateCommands", "(", "array", "$", "commands", ")", ":", "array", "{", "$", "modulesDone", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "finder", "->", "getModuleList", "(", ")", "as", "$", "module", ")", "{", "$", ...
@param array $commands @return array
[ "@param", "array", "$commands" ]
train
https://github.com/nexusnetsoftgmbh/nexuscli/blob/8416b43d31ad56ea379ae2b0bf85d456e78ba67a/src/Nexus/DynamicModules/Business/Model/Hydrator/CommandHydrator.php#L32-L49
VincentChalnot/SidusEAVFilterBundle
Factory/EAVQueryHandlerFactory.php
EAVQueryHandlerFactory.createQueryHandler
public function createQueryHandler( QueryHandlerConfigurationInterface $queryHandlerConfiguration ): QueryHandlerInterface { return new EAVQueryHandler( $this->filterTypeRegistry, $queryHandlerConfiguration, $this->entityManager, $this->familyRegistry,...
php
public function createQueryHandler( QueryHandlerConfigurationInterface $queryHandlerConfiguration ): QueryHandlerInterface { return new EAVQueryHandler( $this->filterTypeRegistry, $queryHandlerConfiguration, $this->entityManager, $this->familyRegistry,...
[ "public", "function", "createQueryHandler", "(", "QueryHandlerConfigurationInterface", "$", "queryHandlerConfiguration", ")", ":", "QueryHandlerInterface", "{", "return", "new", "EAVQueryHandler", "(", "$", "this", "->", "filterTypeRegistry", ",", "$", "queryHandlerConfigur...
@param QueryHandlerConfigurationInterface $queryHandlerConfiguration @throws \UnexpectedValueException @return QueryHandlerInterface
[ "@param", "QueryHandlerConfigurationInterface", "$queryHandlerConfiguration" ]
train
https://github.com/VincentChalnot/SidusEAVFilterBundle/blob/25a9e0495fae30cb96ecded56c50cf7fe70c9032/Factory/EAVQueryHandlerFactory.php#L63-L74
tomphp/patch-builder
spec/TomPHP/PatchBuilder/PatchBufferSpec.php
PatchBufferSpec.it_calls_delete_if_no_lines_are_given
public function it_calls_delete_if_no_lines_are_given() { $range = LineRange::createFromNumbers(5, 7); $this->modified->delete($range)->shouldBeCalled(); $this->replace($range, array()); }
php
public function it_calls_delete_if_no_lines_are_given() { $range = LineRange::createFromNumbers(5, 7); $this->modified->delete($range)->shouldBeCalled(); $this->replace($range, array()); }
[ "public", "function", "it_calls_delete_if_no_lines_are_given", "(", ")", "{", "$", "range", "=", "LineRange", "::", "createFromNumbers", "(", "5", ",", "7", ")", ";", "$", "this", "->", "modified", "->", "delete", "(", "$", "range", ")", "->", "shouldBeCalle...
/* replace()
[ "/", "*", "replace", "()" ]
train
https://github.com/tomphp/patch-builder/blob/4419eaad23016c7db1deffc6cce3f539096c11ce/spec/TomPHP/PatchBuilder/PatchBufferSpec.php#L69-L76
tomphp/patch-builder
spec/TomPHP/PatchBuilder/PatchBufferSpec.php
PatchBufferSpec.it_skips_if_trying_to_insert_nothing
public function it_skips_if_trying_to_insert_nothing(LineNumber $line) { $this->modified->insert()->shouldNotBeCalled(); $this->insert($line, array()); }
php
public function it_skips_if_trying_to_insert_nothing(LineNumber $line) { $this->modified->insert()->shouldNotBeCalled(); $this->insert($line, array()); }
[ "public", "function", "it_skips_if_trying_to_insert_nothing", "(", "LineNumber", "$", "line", ")", "{", "$", "this", "->", "modified", "->", "insert", "(", ")", "->", "shouldNotBeCalled", "(", ")", ";", "$", "this", "->", "insert", "(", "$", "line", ",", "...
/* insert()
[ "/", "*", "insert", "()" ]
train
https://github.com/tomphp/patch-builder/blob/4419eaad23016c7db1deffc6cce3f539096c11ce/spec/TomPHP/PatchBuilder/PatchBufferSpec.php#L131-L136
tomphp/patch-builder
spec/TomPHP/PatchBuilder/PatchBufferSpec.php
PatchBufferSpec.it_skips_if_trying_to_append_nothing
public function it_skips_if_trying_to_append_nothing(LineNumber $line) { $this->modified->insert()->shouldNotBeCalled(); $this->append($line, array()); }
php
public function it_skips_if_trying_to_append_nothing(LineNumber $line) { $this->modified->insert()->shouldNotBeCalled(); $this->append($line, array()); }
[ "public", "function", "it_skips_if_trying_to_append_nothing", "(", "LineNumber", "$", "line", ")", "{", "$", "this", "->", "modified", "->", "insert", "(", ")", "->", "shouldNotBeCalled", "(", ")", ";", "$", "this", "->", "append", "(", "$", "line", ",", "...
/* append()
[ "/", "*", "append", "()" ]
train
https://github.com/tomphp/patch-builder/blob/4419eaad23016c7db1deffc6cce3f539096c11ce/spec/TomPHP/PatchBuilder/PatchBufferSpec.php#L179-L184
tomphp/patch-builder
spec/TomPHP/PatchBuilder/PatchBufferSpec.php
PatchBufferSpec.it_calls_delete_on_modified_content
public function it_calls_delete_on_modified_content(LineRange $range) { $this->modified->delete($range)->shouldBeCalled(); $this->delete($range); }
php
public function it_calls_delete_on_modified_content(LineRange $range) { $this->modified->delete($range)->shouldBeCalled(); $this->delete($range); }
[ "public", "function", "it_calls_delete_on_modified_content", "(", "LineRange", "$", "range", ")", "{", "$", "this", "->", "modified", "->", "delete", "(", "$", "range", ")", "->", "shouldBeCalled", "(", ")", ";", "$", "this", "->", "delete", "(", "$", "ran...
/* delete()
[ "/", "*", "delete", "()" ]
train
https://github.com/tomphp/patch-builder/blob/4419eaad23016c7db1deffc6cce3f539096c11ce/spec/TomPHP/PatchBuilder/PatchBufferSpec.php#L228-L233
tomphp/patch-builder
spec/TomPHP/PatchBuilder/PatchBufferSpec.php
PatchBufferSpec.it_fetches_a_single_line_from_modified_buffer
public function it_fetches_a_single_line_from_modified_buffer() { $this->modified ->getLines(LineRange::createSingleLine(7)) ->shouldBeCalled() ->willReturn(array()); $this->getLine(new LineNumber(7)); }
php
public function it_fetches_a_single_line_from_modified_buffer() { $this->modified ->getLines(LineRange::createSingleLine(7)) ->shouldBeCalled() ->willReturn(array()); $this->getLine(new LineNumber(7)); }
[ "public", "function", "it_fetches_a_single_line_from_modified_buffer", "(", ")", "{", "$", "this", "->", "modified", "->", "getLines", "(", "LineRange", "::", "createSingleLine", "(", "7", ")", ")", "->", "shouldBeCalled", "(", ")", "->", "willReturn", "(", "arr...
/* getLine()
[ "/", "*", "getLine", "()" ]
train
https://github.com/tomphp/patch-builder/blob/4419eaad23016c7db1deffc6cce3f539096c11ce/spec/TomPHP/PatchBuilder/PatchBufferSpec.php#L264-L272
tomphp/patch-builder
spec/TomPHP/PatchBuilder/PatchBufferSpec.php
PatchBufferSpec.it_is_not_modified_if_contents_of_buffers_match
public function it_is_not_modified_if_contents_of_buffers_match() { $content = array('blah'); $this->original->getContents()->willReturn($content); $this->modified->getContents()->willReturn($content); $this->shouldNotBeModified(); }
php
public function it_is_not_modified_if_contents_of_buffers_match() { $content = array('blah'); $this->original->getContents()->willReturn($content); $this->modified->getContents()->willReturn($content); $this->shouldNotBeModified(); }
[ "public", "function", "it_is_not_modified_if_contents_of_buffers_match", "(", ")", "{", "$", "content", "=", "array", "(", "'blah'", ")", ";", "$", "this", "->", "original", "->", "getContents", "(", ")", "->", "willReturn", "(", "$", "content", ")", ";", "$...
/* isModified()
[ "/", "*", "isModified", "()" ]
train
https://github.com/tomphp/patch-builder/blob/4419eaad23016c7db1deffc6cce3f539096c11ce/spec/TomPHP/PatchBuilder/PatchBufferSpec.php#L304-L312
nexusnetsoftgmbh/nexuscli
src/Nexus/CustomCommand/Business/CustomCommandBusinessFactory.php
CustomCommandBusinessFactory.createCommandHydrator
public function createCommandHydrator(string $directory, bool $recursive) : CommandHydratorInterface { return new CommandHydrator( $this->createCommandFinder( $directory, $recursive ) ); }
php
public function createCommandHydrator(string $directory, bool $recursive) : CommandHydratorInterface { return new CommandHydrator( $this->createCommandFinder( $directory, $recursive ) ); }
[ "public", "function", "createCommandHydrator", "(", "string", "$", "directory", ",", "bool", "$", "recursive", ")", ":", "CommandHydratorInterface", "{", "return", "new", "CommandHydrator", "(", "$", "this", "->", "createCommandFinder", "(", "$", "directory", ",",...
@param string $directory @param bool $recursive @return \Nexus\CustomCommand\Business\Model\Hydrator\CommandHydratorInterface
[ "@param", "string", "$directory", "@param", "bool", "$recursive" ]
train
https://github.com/nexusnetsoftgmbh/nexuscli/blob/8416b43d31ad56ea379ae2b0bf85d456e78ba67a/src/Nexus/CustomCommand/Business/CustomCommandBusinessFactory.php#L25-L33
xinix-technology/norm
src/Norm/Filter/Filter.php
Filter.fromSchema
public static function fromSchema($schema, $preFilter = array(), $postFilter = array()) { $rules = array(); foreach ($preFilter as $key => $filter) { $filter = explode('|', $filter); foreach ($filter as $f) { $rules[$key][] = trim($f); } ...
php
public static function fromSchema($schema, $preFilter = array(), $postFilter = array()) { $rules = array(); foreach ($preFilter as $key => $filter) { $filter = explode('|', $filter); foreach ($filter as $f) { $rules[$key][] = trim($f); } ...
[ "public", "static", "function", "fromSchema", "(", "$", "schema", ",", "$", "preFilter", "=", "array", "(", ")", ",", "$", "postFilter", "=", "array", "(", ")", ")", "{", "$", "rules", "=", "array", "(", ")", ";", "foreach", "(", "$", "preFilter", ...
Static method to create instance of filter from database schema configuration. @param array $schema Database schema configuration @param array $preFilter Filters that will be run before the filter @param array $postFilter Filters that will be run after the filter @return \Norm\Filter\Filter
[ "Static", "method", "to", "create", "instance", "of", "filter", "from", "database", "schema", "configuration", "." ]
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Filter/Filter.php#L51-L83
datasift/php_webdriver
src/php/DataSift/BrowserMobProxy/BrowserMobProxyClient.php
BrowserMobProxyClient.createProxy
public function createProxy($port = null) { if ($port !== null) { // we want a specific port // willing to bet that this ends in tears! $response = $this->curl( 'POST', '/proxy', array ('port' => $port) ); ...
php
public function createProxy($port = null) { if ($port !== null) { // we want a specific port // willing to bet that this ends in tears! $response = $this->curl( 'POST', '/proxy', array ('port' => $port) ); ...
[ "public", "function", "createProxy", "(", "$", "port", "=", "null", ")", "{", "if", "(", "$", "port", "!==", "null", ")", "{", "// we want a specific port", "// willing to bet that this ends in tears!", "$", "response", "=", "$", "this", "->", "curl", "(", "'P...
Create a new proxy, running on an (optionally specified) port If the stated port is in use, browsermob-proxy will allocate the next available port for you @param integer $port the preferred port for the proxy @return BrowserMobProxySession a wrapper around the API for the proxy instance that has been created
[ "Create", "a", "new", "proxy", "running", "on", "an", "(", "optionally", "specified", ")", "port" ]
train
https://github.com/datasift/php_webdriver/blob/efca991198616b53c8f40b59ad05306e2b10e7f0/src/php/DataSift/BrowserMobProxy/BrowserMobProxyClient.php#L51-L83
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.create
public static function create($modelAlias = null, $criteria = null) { if ($criteria instanceof RemoteHistoryContaoQuery) { return $criteria; } $query = new RemoteHistoryContaoQuery(null, null, $modelAlias); if ($criteria instanceof Criteria) { $query->mergeWi...
php
public static function create($modelAlias = null, $criteria = null) { if ($criteria instanceof RemoteHistoryContaoQuery) { return $criteria; } $query = new RemoteHistoryContaoQuery(null, null, $modelAlias); if ($criteria instanceof Criteria) { $query->mergeWi...
[ "public", "static", "function", "create", "(", "$", "modelAlias", "=", "null", ",", "$", "criteria", "=", "null", ")", "{", "if", "(", "$", "criteria", "instanceof", "RemoteHistoryContaoQuery", ")", "{", "return", "$", "criteria", ";", "}", "$", "query", ...
Returns a new RemoteHistoryContaoQuery object. @param string $modelAlias The alias of a model in the query @param RemoteHistoryContaoQuery|Criteria $criteria Optional Criteria to build the query from @return RemoteHistoryContaoQuery
[ "Returns", "a", "new", "RemoteHistoryContaoQuery", "object", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L139-L151
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByRemoteAppId
public function filterByRemoteAppId($remoteAppId = null, $comparison = null) { if (is_array($remoteAppId)) { $useMinMax = false; if (isset($remoteAppId['min'])) { $this->addUsingAlias(RemoteHistoryContaoPeer::REMOTE_APP_ID, $remoteAppId['min'], Criteria::GREATER_EQUAL...
php
public function filterByRemoteAppId($remoteAppId = null, $comparison = null) { if (is_array($remoteAppId)) { $useMinMax = false; if (isset($remoteAppId['min'])) { $this->addUsingAlias(RemoteHistoryContaoPeer::REMOTE_APP_ID, $remoteAppId['min'], Criteria::GREATER_EQUAL...
[ "public", "function", "filterByRemoteAppId", "(", "$", "remoteAppId", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "remoteAppId", ")", ")", "{", "$", "useMinMax", "=", "false", ";", "if", "(", "isset", "(...
Filter the query on the remote_app_id column Example usage: <code> $query->filterByRemoteAppId(1234); // WHERE remote_app_id = 1234 $query->filterByRemoteAppId(array(12, 34)); // WHERE remote_app_id IN (12, 34) $query->filterByRemoteAppId(array('min' => 12)); // WHERE remote_app_id >= 12 $query->filterByRemoteAppId(ar...
[ "Filter", "the", "query", "on", "the", "remote_app_id", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L367-L388
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByApiversion
public function filterByApiversion($apiversion = null, $comparison = null) { if (null === $comparison) { if (is_array($apiversion)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $apiversion)) { $apiversion = str_replace('*', '%', $apiv...
php
public function filterByApiversion($apiversion = null, $comparison = null) { if (null === $comparison) { if (is_array($apiversion)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $apiversion)) { $apiversion = str_replace('*', '%', $apiv...
[ "public", "function", "filterByApiversion", "(", "$", "apiversion", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "apiversion", ")", ")", "{", "$", ...
Filter the query on the apiVersion column Example usage: <code> $query->filterByApiversion('fooValue'); // WHERE apiVersion = 'fooValue' $query->filterByApiversion('%fooValue%'); // WHERE apiVersion LIKE '%fooValue%' </code> @param string $apiversion The value to use as filter. Accepts wildcards (* and % trigge...
[ "Filter", "the", "query", "on", "the", "apiVersion", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L405-L417
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByName
public function filterByName($name = null, $comparison = null) { if (null === $comparison) { if (is_array($name)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $name)) { $name = str_replace('*', '%', $name); $comparison...
php
public function filterByName($name = null, $comparison = null) { if (null === $comparison) { if (is_array($name)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $name)) { $name = str_replace('*', '%', $name); $comparison...
[ "public", "function", "filterByName", "(", "$", "name", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "name", ")", ")", "{", "$", "comparison", "=...
Filter the query on the name column Example usage: <code> $query->filterByName('fooValue'); // WHERE name = 'fooValue' $query->filterByName('%fooValue%'); // WHERE name LIKE '%fooValue%' </code> @param string $name The value to use as filter. Accepts wildcards (* and % trigger a LIKE) @param string $compari...
[ "Filter", "the", "query", "on", "the", "name", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L434-L446
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByVersion
public function filterByVersion($version = null, $comparison = null) { if (null === $comparison) { if (is_array($version)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $version)) { $version = str_replace('*', '%', $version); ...
php
public function filterByVersion($version = null, $comparison = null) { if (null === $comparison) { if (is_array($version)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $version)) { $version = str_replace('*', '%', $version); ...
[ "public", "function", "filterByVersion", "(", "$", "version", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "version", ")", ")", "{", "$", "comparis...
Filter the query on the version column Example usage: <code> $query->filterByVersion('fooValue'); // WHERE version = 'fooValue' $query->filterByVersion('%fooValue%'); // WHERE version LIKE '%fooValue%' </code> @param string $version The value to use as filter. Accepts wildcards (* and % trigger a LIKE) @param ...
[ "Filter", "the", "query", "on", "the", "version", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L463-L475
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByConfigDisplayerrors
public function filterByConfigDisplayerrors($configDisplayerrors = null, $comparison = null) { if (null === $comparison) { if (is_array($configDisplayerrors)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configDisplayerrors)) { $conf...
php
public function filterByConfigDisplayerrors($configDisplayerrors = null, $comparison = null) { if (null === $comparison) { if (is_array($configDisplayerrors)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configDisplayerrors)) { $conf...
[ "public", "function", "filterByConfigDisplayerrors", "(", "$", "configDisplayerrors", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "configDisplayerrors", "...
Filter the query on the config_displayErrors column Example usage: <code> $query->filterByConfigDisplayerrors('fooValue'); // WHERE config_displayErrors = 'fooValue' $query->filterByConfigDisplayerrors('%fooValue%'); // WHERE config_displayErrors LIKE '%fooValue%' </code> @param string $configDisplayerrors The ...
[ "Filter", "the", "query", "on", "the", "config_displayErrors", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L492-L504
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByConfigBypasscache
public function filterByConfigBypasscache($configBypasscache = null, $comparison = null) { if (null === $comparison) { if (is_array($configBypasscache)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configBypasscache)) { $configBypass...
php
public function filterByConfigBypasscache($configBypasscache = null, $comparison = null) { if (null === $comparison) { if (is_array($configBypasscache)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configBypasscache)) { $configBypass...
[ "public", "function", "filterByConfigBypasscache", "(", "$", "configBypasscache", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "configBypasscache", ")", ...
Filter the query on the config_bypassCache column Example usage: <code> $query->filterByConfigBypasscache('fooValue'); // WHERE config_bypassCache = 'fooValue' $query->filterByConfigBypasscache('%fooValue%'); // WHERE config_bypassCache LIKE '%fooValue%' </code> @param string $configBypasscache The value to use...
[ "Filter", "the", "query", "on", "the", "config_bypassCache", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L521-L533
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByConfigMinifymarkup
public function filterByConfigMinifymarkup($configMinifymarkup = null, $comparison = null) { if (null === $comparison) { if (is_array($configMinifymarkup)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configMinifymarkup)) { $configMi...
php
public function filterByConfigMinifymarkup($configMinifymarkup = null, $comparison = null) { if (null === $comparison) { if (is_array($configMinifymarkup)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configMinifymarkup)) { $configMi...
[ "public", "function", "filterByConfigMinifymarkup", "(", "$", "configMinifymarkup", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "configMinifymarkup", ")",...
Filter the query on the config_minifyMarkup column Example usage: <code> $query->filterByConfigMinifymarkup('fooValue'); // WHERE config_minifyMarkup = 'fooValue' $query->filterByConfigMinifymarkup('%fooValue%'); // WHERE config_minifyMarkup LIKE '%fooValue%' </code> @param string $configMinifymarkup The value ...
[ "Filter", "the", "query", "on", "the", "config_minifyMarkup", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L550-L562
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByConfigDebugmode
public function filterByConfigDebugmode($configDebugmode = null, $comparison = null) { if (null === $comparison) { if (is_array($configDebugmode)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configDebugmode)) { $configDebugmode = st...
php
public function filterByConfigDebugmode($configDebugmode = null, $comparison = null) { if (null === $comparison) { if (is_array($configDebugmode)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configDebugmode)) { $configDebugmode = st...
[ "public", "function", "filterByConfigDebugmode", "(", "$", "configDebugmode", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "configDebugmode", ")", ")", ...
Filter the query on the config_debugMode column Example usage: <code> $query->filterByConfigDebugmode('fooValue'); // WHERE config_debugMode = 'fooValue' $query->filterByConfigDebugmode('%fooValue%'); // WHERE config_debugMode LIKE '%fooValue%' </code> @param string $configDebugmode The value to use as filter. ...
[ "Filter", "the", "query", "on", "the", "config_debugMode", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L579-L591
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByConfigMaintenancemode
public function filterByConfigMaintenancemode($configMaintenancemode = null, $comparison = null) { if (null === $comparison) { if (is_array($configMaintenancemode)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configMaintenancemode)) { ...
php
public function filterByConfigMaintenancemode($configMaintenancemode = null, $comparison = null) { if (null === $comparison) { if (is_array($configMaintenancemode)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configMaintenancemode)) { ...
[ "public", "function", "filterByConfigMaintenancemode", "(", "$", "configMaintenancemode", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "configMaintenancemode...
Filter the query on the config_maintenanceMode column Example usage: <code> $query->filterByConfigMaintenancemode('fooValue'); // WHERE config_maintenanceMode = 'fooValue' $query->filterByConfigMaintenancemode('%fooValue%'); // WHERE config_maintenanceMode LIKE '%fooValue%' </code> @param string $configMaintena...
[ "Filter", "the", "query", "on", "the", "config_maintenanceMode", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L608-L620
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByConfigGzipscripts
public function filterByConfigGzipscripts($configGzipscripts = null, $comparison = null) { if (null === $comparison) { if (is_array($configGzipscripts)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configGzipscripts)) { $configGzipsc...
php
public function filterByConfigGzipscripts($configGzipscripts = null, $comparison = null) { if (null === $comparison) { if (is_array($configGzipscripts)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configGzipscripts)) { $configGzipsc...
[ "public", "function", "filterByConfigGzipscripts", "(", "$", "configGzipscripts", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "configGzipscripts", ")", ...
Filter the query on the config_gzipScripts column Example usage: <code> $query->filterByConfigGzipscripts('fooValue'); // WHERE config_gzipScripts = 'fooValue' $query->filterByConfigGzipscripts('%fooValue%'); // WHERE config_gzipScripts LIKE '%fooValue%' </code> @param string $configGzipscripts The value to use...
[ "Filter", "the", "query", "on", "the", "config_gzipScripts", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L637-L649
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByConfigRewriteurl
public function filterByConfigRewriteurl($configRewriteurl = null, $comparison = null) { if (null === $comparison) { if (is_array($configRewriteurl)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configRewriteurl)) { $configRewriteurl...
php
public function filterByConfigRewriteurl($configRewriteurl = null, $comparison = null) { if (null === $comparison) { if (is_array($configRewriteurl)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configRewriteurl)) { $configRewriteurl...
[ "public", "function", "filterByConfigRewriteurl", "(", "$", "configRewriteurl", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "configRewriteurl", ")", ")"...
Filter the query on the config_rewriteURL column Example usage: <code> $query->filterByConfigRewriteurl('fooValue'); // WHERE config_rewriteURL = 'fooValue' $query->filterByConfigRewriteurl('%fooValue%'); // WHERE config_rewriteURL LIKE '%fooValue%' </code> @param string $configRewriteurl The value to use as fi...
[ "Filter", "the", "query", "on", "the", "config_rewriteURL", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L666-L678
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByConfigAdminemail
public function filterByConfigAdminemail($configAdminemail = null, $comparison = null) { if (null === $comparison) { if (is_array($configAdminemail)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configAdminemail)) { $configAdminemail...
php
public function filterByConfigAdminemail($configAdminemail = null, $comparison = null) { if (null === $comparison) { if (is_array($configAdminemail)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configAdminemail)) { $configAdminemail...
[ "public", "function", "filterByConfigAdminemail", "(", "$", "configAdminemail", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "configAdminemail", ")", ")"...
Filter the query on the config_adminEmail column Example usage: <code> $query->filterByConfigAdminemail('fooValue'); // WHERE config_adminEmail = 'fooValue' $query->filterByConfigAdminemail('%fooValue%'); // WHERE config_adminEmail LIKE '%fooValue%' </code> @param string $configAdminemail The value to use as fi...
[ "Filter", "the", "query", "on", "the", "config_adminEmail", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L695-L707
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByConfigCachemode
public function filterByConfigCachemode($configCachemode = null, $comparison = null) { if (null === $comparison) { if (is_array($configCachemode)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configCachemode)) { $configCachemode = st...
php
public function filterByConfigCachemode($configCachemode = null, $comparison = null) { if (null === $comparison) { if (is_array($configCachemode)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $configCachemode)) { $configCachemode = st...
[ "public", "function", "filterByConfigCachemode", "(", "$", "configCachemode", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "configCachemode", ")", ")", ...
Filter the query on the config_cacheMode column Example usage: <code> $query->filterByConfigCachemode('fooValue'); // WHERE config_cacheMode = 'fooValue' $query->filterByConfigCachemode('%fooValue%'); // WHERE config_cacheMode LIKE '%fooValue%' </code> @param string $configCachemode The value to use as filter. ...
[ "Filter", "the", "query", "on", "the", "config_cacheMode", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L724-L736
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByStatuscode
public function filterByStatuscode($statuscode = null, $comparison = null) { if (is_array($statuscode)) { $useMinMax = false; if (isset($statuscode['min'])) { $this->addUsingAlias(RemoteHistoryContaoPeer::STATUSCODE, $statuscode['min'], Criteria::GREATER_EQUAL); ...
php
public function filterByStatuscode($statuscode = null, $comparison = null) { if (is_array($statuscode)) { $useMinMax = false; if (isset($statuscode['min'])) { $this->addUsingAlias(RemoteHistoryContaoPeer::STATUSCODE, $statuscode['min'], Criteria::GREATER_EQUAL); ...
[ "public", "function", "filterByStatuscode", "(", "$", "statuscode", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "statuscode", ")", ")", "{", "$", "useMinMax", "=", "false", ";", "if", "(", "isset", "(", ...
Filter the query on the statuscode column Example usage: <code> $query->filterByStatuscode(1234); // WHERE statuscode = 1234 $query->filterByStatuscode(array(12, 34)); // WHERE statuscode IN (12, 34) $query->filterByStatuscode(array('min' => 12)); // WHERE statuscode >= 12 $query->filterByStatuscode(array('max' => 12)...
[ "Filter", "the", "query", "on", "the", "statuscode", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L757-L778
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByExtensions
public function filterByExtensions($extensions = null, $comparison = null) { if (is_object($extensions)) { $extensions = serialize($extensions); } return $this->addUsingAlias(RemoteHistoryContaoPeer::EXTENSIONS, $extensions, $comparison); }
php
public function filterByExtensions($extensions = null, $comparison = null) { if (is_object($extensions)) { $extensions = serialize($extensions); } return $this->addUsingAlias(RemoteHistoryContaoPeer::EXTENSIONS, $extensions, $comparison); }
[ "public", "function", "filterByExtensions", "(", "$", "extensions", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_object", "(", "$", "extensions", ")", ")", "{", "$", "extensions", "=", "serialize", "(", "$", "extensions", ")...
Filter the query on the extensions column @param mixed $extensions The value to use as filter @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL @return RemoteHistoryContaoQuery The current query, for fluid interface
[ "Filter", "the", "query", "on", "the", "extensions", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L788-L795
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByLog
public function filterByLog($log = null, $comparison = null) { if (is_object($log)) { $log = serialize($log); } return $this->addUsingAlias(RemoteHistoryContaoPeer::LOG, $log, $comparison); }
php
public function filterByLog($log = null, $comparison = null) { if (is_object($log)) { $log = serialize($log); } return $this->addUsingAlias(RemoteHistoryContaoPeer::LOG, $log, $comparison); }
[ "public", "function", "filterByLog", "(", "$", "log", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_object", "(", "$", "log", ")", ")", "{", "$", "log", "=", "serialize", "(", "$", "log", ")", ";", "}", "return", "$",...
Filter the query on the log column @param mixed $log The value to use as filter @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL @return RemoteHistoryContaoQuery The current query, for fluid interface
[ "Filter", "the", "query", "on", "the", "log", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L805-L812
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByPHP
public function filterByPHP($pHP = null, $comparison = null) { if (is_object($pHP)) { $pHP = serialize($pHP); } return $this->addUsingAlias(RemoteHistoryContaoPeer::PHP, $pHP, $comparison); }
php
public function filterByPHP($pHP = null, $comparison = null) { if (is_object($pHP)) { $pHP = serialize($pHP); } return $this->addUsingAlias(RemoteHistoryContaoPeer::PHP, $pHP, $comparison); }
[ "public", "function", "filterByPHP", "(", "$", "pHP", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_object", "(", "$", "pHP", ")", ")", "{", "$", "pHP", "=", "serialize", "(", "$", "pHP", ")", ";", "}", "return", "$",...
Filter the query on the php column @param mixed $pHP The value to use as filter @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL @return RemoteHistoryContaoQuery The current query, for fluid interface
[ "Filter", "the", "query", "on", "the", "php", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L822-L829
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.filterByMySQL
public function filterByMySQL($mySQL = null, $comparison = null) { if (is_object($mySQL)) { $mySQL = serialize($mySQL); } return $this->addUsingAlias(RemoteHistoryContaoPeer::MYSQL, $mySQL, $comparison); }
php
public function filterByMySQL($mySQL = null, $comparison = null) { if (is_object($mySQL)) { $mySQL = serialize($mySQL); } return $this->addUsingAlias(RemoteHistoryContaoPeer::MYSQL, $mySQL, $comparison); }
[ "public", "function", "filterByMySQL", "(", "$", "mySQL", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_object", "(", "$", "mySQL", ")", ")", "{", "$", "mySQL", "=", "serialize", "(", "$", "mySQL", ")", ";", "}", "retur...
Filter the query on the mysql column @param mixed $mySQL The value to use as filter @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL @return RemoteHistoryContaoQuery The current query, for fluid interface
[ "Filter", "the", "query", "on", "the", "mysql", "column" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L839-L846
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.useRemoteAppQuery
public function useRemoteAppQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinRemoteApp($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'RemoteApp', '\Slashworks\AppBundle\Model\RemoteAppQuery'); }
php
public function useRemoteAppQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinRemoteApp($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'RemoteApp', '\Slashworks\AppBundle\Model\RemoteAppQuery'); }
[ "public", "function", "useRemoteAppQuery", "(", "$", "relationAlias", "=", "null", ",", "$", "joinType", "=", "Criteria", "::", "INNER_JOIN", ")", "{", "return", "$", "this", "->", "joinRemoteApp", "(", "$", "relationAlias", ",", "$", "joinType", ")", "->", ...
Use the RemoteApp relation RemoteApp object @see useQuery() @param string $relationAlias optional alias for the relation, to be used as main alias in the secondary query @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' @return \Slashworks\AppBundle\Model\Remot...
[ "Use", "the", "RemoteApp", "relation", "RemoteApp", "object" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L917-L922
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php
BaseRemoteHistoryContaoQuery.prune
public function prune($remoteHistoryContao = null) { if ($remoteHistoryContao) { $this->addUsingAlias(RemoteHistoryContaoPeer::ID, $remoteHistoryContao->getId(), Criteria::NOT_EQUAL); } return $this; }
php
public function prune($remoteHistoryContao = null) { if ($remoteHistoryContao) { $this->addUsingAlias(RemoteHistoryContaoPeer::ID, $remoteHistoryContao->getId(), Criteria::NOT_EQUAL); } return $this; }
[ "public", "function", "prune", "(", "$", "remoteHistoryContao", "=", "null", ")", "{", "if", "(", "$", "remoteHistoryContao", ")", "{", "$", "this", "->", "addUsingAlias", "(", "RemoteHistoryContaoPeer", "::", "ID", ",", "$", "remoteHistoryContao", "->", "getI...
Exclude object from result @param RemoteHistoryContao $remoteHistoryContao Object to remove from the list of results @return RemoteHistoryContaoQuery The current query, for fluid interface
[ "Exclude", "object", "from", "result" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L931-L938
OpenClassrooms/Akismet
src/Services/Impl/AkismetServiceImpl.php
AkismetServiceImpl.commentCheck
public function commentCheck(Comment $comment) { return 'true' === $this->apiClient->post(self::COMMENT_CHECK, $comment->toArray()); }
php
public function commentCheck(Comment $comment) { return 'true' === $this->apiClient->post(self::COMMENT_CHECK, $comment->toArray()); }
[ "public", "function", "commentCheck", "(", "Comment", "$", "comment", ")", "{", "return", "'true'", "===", "$", "this", "->", "apiClient", "->", "post", "(", "self", "::", "COMMENT_CHECK", ",", "$", "comment", "->", "toArray", "(", ")", ")", ";", "}" ]
{@inheritdoc}
[ "{" ]
train
https://github.com/OpenClassrooms/Akismet/blob/b1bd35128f5dfe028481adf338d5eb752a09b90e/src/Services/Impl/AkismetServiceImpl.php#L36-L39
OpenClassrooms/Akismet
src/Services/Impl/AkismetServiceImpl.php
AkismetServiceImpl.submitSpam
public function submitSpam(Comment $comment) { $this->apiClient->post(self::SUBMIT_SPAM, $comment->toArray()); }
php
public function submitSpam(Comment $comment) { $this->apiClient->post(self::SUBMIT_SPAM, $comment->toArray()); }
[ "public", "function", "submitSpam", "(", "Comment", "$", "comment", ")", "{", "$", "this", "->", "apiClient", "->", "post", "(", "self", "::", "SUBMIT_SPAM", ",", "$", "comment", "->", "toArray", "(", ")", ")", ";", "}" ]
{@inheritdoc}
[ "{" ]
train
https://github.com/OpenClassrooms/Akismet/blob/b1bd35128f5dfe028481adf338d5eb752a09b90e/src/Services/Impl/AkismetServiceImpl.php#L44-L47
OpenClassrooms/Akismet
src/Services/Impl/AkismetServiceImpl.php
AkismetServiceImpl.submitHam
public function submitHam(Comment $comment) { $this->apiClient->post(self::SUBMIT_HAM, $comment->toArray()); }
php
public function submitHam(Comment $comment) { $this->apiClient->post(self::SUBMIT_HAM, $comment->toArray()); }
[ "public", "function", "submitHam", "(", "Comment", "$", "comment", ")", "{", "$", "this", "->", "apiClient", "->", "post", "(", "self", "::", "SUBMIT_HAM", ",", "$", "comment", "->", "toArray", "(", ")", ")", ";", "}" ]
{@inheritdoc}
[ "{" ]
train
https://github.com/OpenClassrooms/Akismet/blob/b1bd35128f5dfe028481adf338d5eb752a09b90e/src/Services/Impl/AkismetServiceImpl.php#L52-L55
left-right/center
src/libraries/Table.php
Table.column
public function column($name, $type, $label=false, $width=false, $height=false) { if ($label === false) $label = $name; $this->columns[] = compact('name', 'type', 'label', 'width', 'height'); }
php
public function column($name, $type, $label=false, $width=false, $height=false) { if ($label === false) $label = $name; $this->columns[] = compact('name', 'type', 'label', 'width', 'height'); }
[ "public", "function", "column", "(", "$", "name", ",", "$", "type", ",", "$", "label", "=", "false", ",", "$", "width", "=", "false", ",", "$", "height", "=", "false", ")", "{", "if", "(", "$", "label", "===", "false", ")", "$", "label", "=", "...
add a column. $trans is translation file key
[ "add", "a", "column", ".", "$trans", "is", "translation", "file", "key" ]
train
https://github.com/left-right/center/blob/47c225538475ca3e87fa49f31a323b6e6bd4eff2/src/libraries/Table.php#L23-L26
left-right/center
src/libraries/Table.php
Table.draw
public function draw($id='untitled') { //start up if ($this->draggable) array_unshift($this->columns, ['label'=>'', 'type'=>'draggy', 'name'=>'draggy']); if ($this->deletable) self::column('delete', 'delete', ''); if ($this->grouped) $last_group = ''; $colspan = count($this->columns); $rowspan = count($t...
php
public function draw($id='untitled') { //start up if ($this->draggable) array_unshift($this->columns, ['label'=>'', 'type'=>'draggy', 'name'=>'draggy']); if ($this->deletable) self::column('delete', 'delete', ''); if ($this->grouped) $last_group = ''; $colspan = count($this->columns); $rowspan = count($t...
[ "public", "function", "draw", "(", "$", "id", "=", "'untitled'", ")", "{", "//start up", "if", "(", "$", "this", "->", "draggable", ")", "array_unshift", "(", "$", "this", "->", "columns", ",", "[", "'label'", "=>", "''", ",", "'type'", "=>", "'draggy'...
draw the table
[ "draw", "the", "table" ]
train
https://github.com/left-right/center/blob/47c225538475ca3e87fa49f31a323b6e6bd4eff2/src/libraries/Table.php#L39-L124
xinix-technology/norm
src/Norm/Type/Collection.php
Collection.compare
public function compare($another) { if ($another instanceof Collection) { $another = $another->toArray(); } $me = $this->toArray(); if ($me == $another) { return 0; } else { return 1; } }
php
public function compare($another) { if ($another instanceof Collection) { $another = $another->toArray(); } $me = $this->toArray(); if ($me == $another) { return 0; } else { return 1; } }
[ "public", "function", "compare", "(", "$", "another", ")", "{", "if", "(", "$", "another", "instanceof", "Collection", ")", "{", "$", "another", "=", "$", "another", "->", "toArray", "(", ")", ";", "}", "$", "me", "=", "$", "this", "->", "toArray", ...
Perform comparison between this implementation and another implementation of `\Norm\Type\Collection` or an array. @param mixed $another @return int
[ "Perform", "comparison", "between", "this", "implementation", "and", "another", "implementation", "of", "\\", "Norm", "\\", "Type", "\\", "Collection", "or", "an", "array", "." ]
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Type/Collection.php#L186-L199
webignition/website-sitemap-finder
src/WebsiteSitemapFinder.php
WebsiteSitemapFinder.findSitemapUrls
public function findSitemapUrls(UriInterface $uri): array { $sitemapUrls = $this->findSitemapUrlsFromRobotsTxt($uri); if (empty($sitemapUrls)) { $sitemapUrls = [ AbsoluteUrlDeriver::derive(new Uri($uri), new Uri('/' . self::DEFAULT_SITEMAP_XML_FILE_NAME)), ...
php
public function findSitemapUrls(UriInterface $uri): array { $sitemapUrls = $this->findSitemapUrlsFromRobotsTxt($uri); if (empty($sitemapUrls)) { $sitemapUrls = [ AbsoluteUrlDeriver::derive(new Uri($uri), new Uri('/' . self::DEFAULT_SITEMAP_XML_FILE_NAME)), ...
[ "public", "function", "findSitemapUrls", "(", "UriInterface", "$", "uri", ")", ":", "array", "{", "$", "sitemapUrls", "=", "$", "this", "->", "findSitemapUrlsFromRobotsTxt", "(", "$", "uri", ")", ";", "if", "(", "empty", "(", "$", "sitemapUrls", ")", ")", ...
@param UriInterface $uri @return UriInterface[]
[ "@param", "UriInterface", "$uri" ]
train
https://github.com/webignition/website-sitemap-finder/blob/980f2fea4990c7bd942ebc28be7c79906997f187/src/WebsiteSitemapFinder.php#L38-L49
webignition/website-sitemap-finder
src/WebsiteSitemapFinder.php
WebsiteSitemapFinder.findSitemapUrlsFromRobotsTxt
private function findSitemapUrlsFromRobotsTxt(UriInterface $uri): array { $sitemapUris = []; $robotsTxtContent = $this->retrieveRobotsTxtContent($uri); if (empty($robotsTxtContent)) { return $sitemapUris; } $robotsTxtFileParser = new RobotsTxtFileParser(); ...
php
private function findSitemapUrlsFromRobotsTxt(UriInterface $uri): array { $sitemapUris = []; $robotsTxtContent = $this->retrieveRobotsTxtContent($uri); if (empty($robotsTxtContent)) { return $sitemapUris; } $robotsTxtFileParser = new RobotsTxtFileParser(); ...
[ "private", "function", "findSitemapUrlsFromRobotsTxt", "(", "UriInterface", "$", "uri", ")", ":", "array", "{", "$", "sitemapUris", "=", "[", "]", ";", "$", "robotsTxtContent", "=", "$", "this", "->", "retrieveRobotsTxtContent", "(", "$", "uri", ")", ";", "i...
@param UriInterface $uri @return UriInterface[]
[ "@param", "UriInterface", "$uri" ]
train
https://github.com/webignition/website-sitemap-finder/blob/980f2fea4990c7bd942ebc28be7c79906997f187/src/WebsiteSitemapFinder.php#L56-L82
npbtrac/yii2-enpii-cms
libs/helpers/NpDateTimeHelper.php
NpDateTimeHelper.toDbFormat
public static function toDbFormat($format = "Y-m-d H:i:s", $timestamp = null) { if ($timestamp === null) { $timestamp = time(); } return date($format, $timestamp); }
php
public static function toDbFormat($format = "Y-m-d H:i:s", $timestamp = null) { if ($timestamp === null) { $timestamp = time(); } return date($format, $timestamp); }
[ "public", "static", "function", "toDbFormat", "(", "$", "format", "=", "\"Y-m-d H:i:s\"", ",", "$", "timestamp", "=", "null", ")", "{", "if", "(", "$", "timestamp", "===", "null", ")", "{", "$", "timestamp", "=", "time", "(", ")", ";", "}", "return", ...
Get datetime format to put to database. Use GMT time for database @param string $format @param null $timestamp @return string
[ "Get", "datetime", "format", "to", "put", "to", "database", ".", "Use", "GMT", "time", "for", "database" ]
train
https://github.com/npbtrac/yii2-enpii-cms/blob/3495e697509a57a573983f552629ff9f707a63b9/libs/helpers/NpDateTimeHelper.php#L19-L25
npbtrac/yii2-enpii-cms
libs/helpers/NpDateTimeHelper.php
NpDateTimeHelper.toDbFormatGmt
public static function toDbFormatGmt($format = "Y-m-d H:i:s", $timestamp = null) { if ($timestamp === null) { $timestamp = time(); } return gmdate($format, $timestamp); }
php
public static function toDbFormatGmt($format = "Y-m-d H:i:s", $timestamp = null) { if ($timestamp === null) { $timestamp = time(); } return gmdate($format, $timestamp); }
[ "public", "static", "function", "toDbFormatGmt", "(", "$", "format", "=", "\"Y-m-d H:i:s\"", ",", "$", "timestamp", "=", "null", ")", "{", "if", "(", "$", "timestamp", "===", "null", ")", "{", "$", "timestamp", "=", "time", "(", ")", ";", "}", "return"...
Get datetime format to put to database. Use GMT time for database @param string $format @param null $timestamp @return string
[ "Get", "datetime", "format", "to", "put", "to", "database", ".", "Use", "GMT", "time", "for", "database" ]
train
https://github.com/npbtrac/yii2-enpii-cms/blob/3495e697509a57a573983f552629ff9f707a63b9/libs/helpers/NpDateTimeHelper.php#L33-L39
qcubed/orm
src/Query/Condition/ConditionBase.php
ConditionBase.getWhereClause
public function getWhereClause(Builder $objBuilder, $blnProcessOnce = false) { if ($blnProcessOnce && $this->blnProcessed) { return null; } $this->blnProcessed = true; try { $objConditionBuilder = new PartialBuilder($objBuilder); $this->updateQue...
php
public function getWhereClause(Builder $objBuilder, $blnProcessOnce = false) { if ($blnProcessOnce && $this->blnProcessed) { return null; } $this->blnProcessed = true; try { $objConditionBuilder = new PartialBuilder($objBuilder); $this->updateQue...
[ "public", "function", "getWhereClause", "(", "Builder", "$", "objBuilder", ",", "$", "blnProcessOnce", "=", "false", ")", "{", "if", "(", "$", "blnProcessOnce", "&&", "$", "this", "->", "blnProcessed", ")", "{", "return", "null", ";", "}", "$", "this", "...
Used internally by QCubed Query to get an individual where clause for a given condition Mostly used for conditional joins. @param Builder $objBuilder @param bool|false $blnProcessOnce @return null|string @throws \Exception @throws Caller
[ "Used", "internally", "by", "QCubed", "Query", "to", "get", "an", "individual", "where", "clause", "for", "a", "given", "condition", "Mostly", "used", "for", "conditional", "joins", "." ]
train
https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Query/Condition/ConditionBase.php#L46-L63
Chill-project/Main
Form/Type/CenterType.php
CenterType.buildForm
public function buildForm(FormBuilderInterface $builder, array $options) { if ($this->getParent() === 'hidden') { $builder->addModelTransformer($this->transformer); } }
php
public function buildForm(FormBuilderInterface $builder, array $options) { if ($this->getParent() === 'hidden') { $builder->addModelTransformer($this->transformer); } }
[ "public", "function", "buildForm", "(", "FormBuilderInterface", "$", "builder", ",", "array", "$", "options", ")", "{", "if", "(", "$", "this", "->", "getParent", "(", ")", "===", "'hidden'", ")", "{", "$", "builder", "->", "addModelTransformer", "(", "$",...
add a data transformer if user can reach only one center @param FormBuilderInterface $builder @param array $options
[ "add", "a", "data", "transformer", "if", "user", "can", "reach", "only", "one", "center" ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Form/Type/CenterType.php#L111-L116
Chill-project/Main
Form/Type/CenterType.php
CenterType.prepareReachableCenterByUser
private function prepareReachableCenterByUser() { $groupCenters = $this->user->getGroupCenters(); foreach ($groupCenters as $groupCenter) { $center = $groupCenter->getCenter(); if (!array_key_exists($center->getId(), $th...
php
private function prepareReachableCenterByUser() { $groupCenters = $this->user->getGroupCenters(); foreach ($groupCenters as $groupCenter) { $center = $groupCenter->getCenter(); if (!array_key_exists($center->getId(), $th...
[ "private", "function", "prepareReachableCenterByUser", "(", ")", "{", "$", "groupCenters", "=", "$", "this", "->", "user", "->", "getGroupCenters", "(", ")", ";", "foreach", "(", "$", "groupCenters", "as", "$", "groupCenter", ")", "{", "$", "center", "=", ...
populate reachableCenters as an associative array where keys are center.id and value are center entities.
[ "populate", "reachableCenters", "as", "an", "associative", "array", "where", "keys", "are", "center", ".", "id", "and", "value", "are", "center", "entities", "." ]
train
https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Form/Type/CenterType.php#L123-L136
ClanCats/Core
src/classes/CCJson.php
CCJson.encode
public static function encode( $array, $beautify = false ) { // php53 fix if ( defined( 'JSON_UNESCAPED_SLASHES' ) ) { $json = json_encode( $array, JSON_UNESCAPED_SLASHES ); } else { $json = json_encode( $array ); } if ( $beautify ) { return static::beautify( $json ); } retur...
php
public static function encode( $array, $beautify = false ) { // php53 fix if ( defined( 'JSON_UNESCAPED_SLASHES' ) ) { $json = json_encode( $array, JSON_UNESCAPED_SLASHES ); } else { $json = json_encode( $array ); } if ( $beautify ) { return static::beautify( $json ); } retur...
[ "public", "static", "function", "encode", "(", "$", "array", ",", "$", "beautify", "=", "false", ")", "{", "// php53 fix", "if", "(", "defined", "(", "'JSON_UNESCAPED_SLASHES'", ")", ")", "{", "$", "json", "=", "json_encode", "(", "$", "array", ",", "JSO...
encode json @param array $array @param bool $beautify @return string
[ "encode", "json" ]
train
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCJson.php#L25-L43
ClanCats/Core
src/classes/CCJson.php
CCJson.beautify
public static function beautify( $json, $tab = "\t", $break = "\n" ) { $buffer = ""; $level = 0; $in_string = false; $len = strlen( $json ); for($c = 0; $c < $len; $c++) { $char = $json[$c]; switch( $char ) { case '{': case '[': if( !$in_string ) { $buffer ...
php
public static function beautify( $json, $tab = "\t", $break = "\n" ) { $buffer = ""; $level = 0; $in_string = false; $len = strlen( $json ); for($c = 0; $c < $len; $c++) { $char = $json[$c]; switch( $char ) { case '{': case '[': if( !$in_string ) { $buffer ...
[ "public", "static", "function", "beautify", "(", "$", "json", ",", "$", "tab", "=", "\"\\t\"", ",", "$", "break", "=", "\"\\n\"", ")", "{", "$", "buffer", "=", "\"\"", ";", "$", "level", "=", "0", ";", "$", "in_string", "=", "false", ";", "$", "l...
beautifier @param string $json @param string $tab @param strgin $break @return string
[ "beautifier" ]
train
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCJson.php#L87-L141
webforge-labs/psc-cms
lib/Psc/System/SimpleRarArchive.php
SimpleRarArchive.extractTo
public function extractTo(WebforgeDir $dir = NULL) { if (!isset($dir)) $dir = $this->rar->getDirectory(); else $dir->create(); $this->exec('x', array('y'), (string) $dir); return $this; }
php
public function extractTo(WebforgeDir $dir = NULL) { if (!isset($dir)) $dir = $this->rar->getDirectory(); else $dir->create(); $this->exec('x', array('y'), (string) $dir); return $this; }
[ "public", "function", "extractTo", "(", "WebforgeDir", "$", "dir", "=", "NULL", ")", "{", "if", "(", "!", "isset", "(", "$", "dir", ")", ")", "$", "dir", "=", "$", "this", "->", "rar", "->", "getDirectory", "(", ")", ";", "else", "$", "dir", "->"...
Entpackt alle Dateien des Archives in ein Verzeichnis wird das Verzeichnis nicht angegeben, so wird das Verzeichnis genommen in dem sich das Archiv befindet existiert das Verzeichnis nicht, wird es angelegt
[ "Entpackt", "alle", "Dateien", "des", "Archives", "in", "ein", "Verzeichnis" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/System/SimpleRarArchive.php#L38-L46
jfusion/org.jfusion.framework
src/Installer/Plugin.php
Plugin.install
function install($dir = null, &$result) { // Get a database connector object $db = Factory::getDBO(); $result['status'] = false; $result['name'] = null; if (!$dir && !is_dir(Path::clean($dir))) { $this->installer->abort(Text::_('INSTALL_INVALID_PATH')); t...
php
function install($dir = null, &$result) { // Get a database connector object $db = Factory::getDBO(); $result['status'] = false; $result['name'] = null; if (!$dir && !is_dir(Path::clean($dir))) { $this->installer->abort(Text::_('INSTALL_INVALID_PATH')); t...
[ "function", "install", "(", "$", "dir", "=", "null", ",", "&", "$", "result", ")", "{", "// Get a database connector object", "$", "db", "=", "Factory", "::", "getDBO", "(", ")", ";", "$", "result", "[", "'status'", "]", "=", "false", ";", "$", "result...
handles JFusion plugin installation @param mixed $dir install path @param array &$result @throws \RuntimeException @return array
[ "handles", "JFusion", "plugin", "installation" ]
train
https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Installer/Plugin.php#L66-L224