id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
199,800
ZFury/framework
library/Mvc/Controller/AbstractCrudController.php
AbstractCrudController.loadEntity
protected function loadEntity() { $params = array_merge($this->params()->fromPost(), $this->params()->fromRoute()); if (empty($params['id'])) { throw new EntityNotFoundException('Bad Request'); } $objectManager = $this->getServiceLocator()->get('Doctrine\ORM\EntityManage...
php
protected function loadEntity() { $params = array_merge($this->params()->fromPost(), $this->params()->fromRoute()); if (empty($params['id'])) { throw new EntityNotFoundException('Bad Request'); } $objectManager = $this->getServiceLocator()->get('Doctrine\ORM\EntityManage...
[ "protected", "function", "loadEntity", "(", ")", "{", "$", "params", "=", "array_merge", "(", "$", "this", "->", "params", "(", ")", "->", "fromPost", "(", ")", ",", "$", "this", "->", "params", "(", ")", "->", "fromRoute", "(", ")", ")", ";", "if"...
Find entity by id @return mixed @throws \Doctrine\ORM\EntityNotFoundException
[ "Find", "entity", "by", "id" ]
eee4ca2a64d2d65490777b08be56c4c9b67bc892
https://github.com/ZFury/framework/blob/eee4ca2a64d2d65490777b08be56c4c9b67bc892/library/Mvc/Controller/AbstractCrudController.php#L148-L161
199,801
SagittariusX/Beluga.Translation
src/Beluga/Translation/Source/ArraySource.php
ArraySource.getTranslation
public function getTranslation( $identifier, $defaultTranslation = null ) : string { if ( $this->_useNumericId ) { // Not integer identifier. End here with an exception if ( ! \is_int( $identifier ) ) { throw new \InvalidArgumentException( 'Current ' . __CLASS__ ....
php
public function getTranslation( $identifier, $defaultTranslation = null ) : string { if ( $this->_useNumericId ) { // Not integer identifier. End here with an exception if ( ! \is_int( $identifier ) ) { throw new \InvalidArgumentException( 'Current ' . __CLASS__ ....
[ "public", "function", "getTranslation", "(", "$", "identifier", ",", "$", "defaultTranslation", "=", "null", ")", ":", "string", "{", "if", "(", "$", "this", "->", "_useNumericId", ")", "{", "// Not integer identifier. End here with an exception", "if", "(", "!", ...
Gets the translation with the defined identifier @param string|int $identifier @param string|null $defaultTranslation Is returned if the translation was not found @return string @throws \InvalidArgumentException If the $identifier is invalid
[ "Gets", "the", "translation", "with", "the", "defined", "identifier" ]
8f66c4fef6fa4494413972ca56bd8e13f5a7e444
https://github.com/SagittariusX/Beluga.Translation/blob/8f66c4fef6fa4494413972ca56bd8e13f5a7e444/src/Beluga/Translation/Source/ArraySource.php#L129-L220
199,802
SagittariusX/Beluga.Translation
src/Beluga/Translation/Source/ArraySource.php
ArraySource.getTranslations
public function getTranslations( $category = null ) : array { $translations = []; // If no category is defined (must be NULL) return all translations without a if ( \is_null( $category ) ) { foreach ( $this->_translations as $identifier => $transData ) { if ( ...
php
public function getTranslations( $category = null ) : array { $translations = []; // If no category is defined (must be NULL) return all translations without a if ( \is_null( $category ) ) { foreach ( $this->_translations as $identifier => $transData ) { if ( ...
[ "public", "function", "getTranslations", "(", "$", "category", "=", "null", ")", ":", "array", "{", "$", "translations", "=", "[", "]", ";", "// If no category is defined (must be NULL) return all translations without a", "if", "(", "\\", "is_null", "(", "$", "categ...
Gets all translations of an specific category. If not category is defined all translations of all categories are returned. @param string $category @return array
[ "Gets", "all", "translations", "of", "an", "specific", "category", ".", "If", "not", "category", "is", "defined", "all", "translations", "of", "all", "categories", "are", "returned", "." ]
8f66c4fef6fa4494413972ca56bd8e13f5a7e444
https://github.com/SagittariusX/Beluga.Translation/blob/8f66c4fef6fa4494413972ca56bd8e13f5a7e444/src/Beluga/Translation/Source/ArraySource.php#L229-L300
199,803
SagittariusX/Beluga.Translation
src/Beluga/Translation/Source/ArraySource.php
ArraySource.LoadFromFolder
public static function LoadFromFolder( string $folder, Locale $locale, bool $useNumericId = false ) { $languageFolderBase = rtrim( $folder, '\\/' ); if ( ! empty( $languageFolderBase ) ) { $languageFolderBase .= '/'; } $languageFile = $languageFolderBase . $locale->getLID() . '_' . $locale->getCI...
php
public static function LoadFromFolder( string $folder, Locale $locale, bool $useNumericId = false ) { $languageFolderBase = rtrim( $folder, '\\/' ); if ( ! empty( $languageFolderBase ) ) { $languageFolderBase .= '/'; } $languageFile = $languageFolderBase . $locale->getLID() . '_' . $locale->getCI...
[ "public", "static", "function", "LoadFromFolder", "(", "string", "$", "folder", ",", "Locale", "$", "locale", ",", "bool", "$", "useNumericId", "=", "false", ")", "{", "$", "languageFolderBase", "=", "rtrim", "(", "$", "folder", ",", "'\\\\/'", ")", ";", ...
Loads a translation array source from a specific folder that contains one or more locale depending PHP files. E.G: if the defined $folder is '/var/www/example.com/translations' and the declared Locale is de_DE.UTF-8 it tries to use: - /var/www/example.com/translations/de_DE.UTF-8.php - /var/www/example.com/translati...
[ "Loads", "a", "translation", "array", "source", "from", "a", "specific", "folder", "that", "contains", "one", "or", "more", "locale", "depending", "PHP", "files", "." ]
8f66c4fef6fa4494413972ca56bd8e13f5a7e444
https://github.com/SagittariusX/Beluga.Translation/blob/8f66c4fef6fa4494413972ca56bd8e13f5a7e444/src/Beluga/Translation/Source/ArraySource.php#L460-L493
199,804
black-lamp/blcms-cart
CartComponent.php
CartComponent.add
public function add($productId, $count, $attributesAndValues = null, $additionalProducts = [], $combinationId = null) { if (!empty($attributesAndValues)) { $attributesAndValues = Json::decode($attributesAndValues); } if ($this->saveSelectedCombination) { $combination...
php
public function add($productId, $count, $attributesAndValues = null, $additionalProducts = [], $combinationId = null) { if (!empty($attributesAndValues)) { $attributesAndValues = Json::decode($attributesAndValues); } if ($this->saveSelectedCombination) { $combination...
[ "public", "function", "add", "(", "$", "productId", ",", "$", "count", ",", "$", "attributesAndValues", "=", "null", ",", "$", "additionalProducts", "=", "[", "]", ",", "$", "combinationId", "=", "null", ")", "{", "if", "(", "!", "empty", "(", "$", "...
Adds product to cart. @param $productId @param $count @param null $attributesAndValues @param array $additionalProducts @param null $combinationId
[ "Adds", "product", "to", "cart", "." ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L104-L121
199,805
black-lamp/blcms-cart
CartComponent.php
CartComponent.saveProductToDataBase
private function saveProductToDataBase($productId, $count, $attributesAndValues = null, $additionalProducts = null, $combinationId = null) { $order = $this->getIncompleteOrderFromDB(); if (\Yii::$app->getModule('shop')->enableCombinations) { if (!empty($attributesAndValues)) { ...
php
private function saveProductToDataBase($productId, $count, $attributesAndValues = null, $additionalProducts = null, $combinationId = null) { $order = $this->getIncompleteOrderFromDB(); if (\Yii::$app->getModule('shop')->enableCombinations) { if (!empty($attributesAndValues)) { ...
[ "private", "function", "saveProductToDataBase", "(", "$", "productId", ",", "$", "count", ",", "$", "attributesAndValues", "=", "null", ",", "$", "additionalProducts", "=", "null", ",", "$", "combinationId", "=", "null", ")", "{", "$", "order", "=", "$", "...
Saves product to database if the corresponding property is true. @param integer $productId @param integer $count @param array|null $attributesAndValues @param array|null $additionalProducts @param null $combinationId @throws Exception
[ "Saves", "product", "to", "database", "if", "the", "corresponding", "property", "is", "true", "." ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L133-L183
199,806
black-lamp/blcms-cart
CartComponent.php
CartComponent.getIncompleteOrderFromDB
private function getIncompleteOrderFromDB() { $order = Order::find()->where([ 'user_id' => \Yii::$app->user->id, 'status' => OrderStatus::STATUS_INCOMPLETE]) ->one(); if (empty($order)) { $order = new Order(); $order->uid = $this->generate...
php
private function getIncompleteOrderFromDB() { $order = Order::find()->where([ 'user_id' => \Yii::$app->user->id, 'status' => OrderStatus::STATUS_INCOMPLETE]) ->one(); if (empty($order)) { $order = new Order(); $order->uid = $this->generate...
[ "private", "function", "getIncompleteOrderFromDB", "(", ")", "{", "$", "order", "=", "Order", "::", "find", "(", ")", "->", "where", "(", "[", "'user_id'", "=>", "\\", "Yii", "::", "$", "app", "->", "user", "->", "id", ",", "'status'", "=>", "OrderStat...
Gets or creates incomplete order record from database. @return array|Order|null|ActiveRecord
[ "Gets", "or", "creates", "incomplete", "order", "record", "from", "database", "." ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L219-L236
199,807
black-lamp/blcms-cart
CartComponent.php
CartComponent.saveSelectedCombinationToSession
public function saveSelectedCombinationToSession($combination) { if (!empty($combination)) { $items = Yii::$app->session[self::SESSION_KEY_SELECTED_COMBINATIONS]; $itemIsExist = false; if(!empty($items)) { foreach ($items as $key => $item) { ...
php
public function saveSelectedCombinationToSession($combination) { if (!empty($combination)) { $items = Yii::$app->session[self::SESSION_KEY_SELECTED_COMBINATIONS]; $itemIsExist = false; if(!empty($items)) { foreach ($items as $key => $item) { ...
[ "public", "function", "saveSelectedCombinationToSession", "(", "$", "combination", ")", "{", "if", "(", "!", "empty", "(", "$", "combination", ")", ")", "{", "$", "items", "=", "Yii", "::", "$", "app", "->", "session", "[", "self", "::", "SESSION_KEY_SELEC...
Saves last selected product combinations to session. @param Combination $combination @return bool
[ "Saves", "last", "selected", "product", "combinations", "to", "session", "." ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L328-L355
199,808
black-lamp/blcms-cart
CartComponent.php
CartComponent.getSelectedCombinationFromSession
public function getSelectedCombinationFromSession($productId) { $combination = null; if (!empty($productId)) { $items = Yii::$app->session[self::SESSION_KEY_SELECTED_COMBINATIONS]; if (!empty($items)) { $combinationId = null; foreach ($items...
php
public function getSelectedCombinationFromSession($productId) { $combination = null; if (!empty($productId)) { $items = Yii::$app->session[self::SESSION_KEY_SELECTED_COMBINATIONS]; if (!empty($items)) { $combinationId = null; foreach ($items...
[ "public", "function", "getSelectedCombinationFromSession", "(", "$", "productId", ")", "{", "$", "combination", "=", "null", ";", "if", "(", "!", "empty", "(", "$", "productId", ")", ")", "{", "$", "items", "=", "Yii", "::", "$", "app", "->", "session", ...
Gets last selected product combinations from session. @param $productId [[Product]] id @return null|Combination
[ "Gets", "last", "selected", "product", "combinations", "from", "session", "." ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L363-L384
199,809
black-lamp/blcms-cart
CartComponent.php
CartComponent.getOrderItems
public function getOrderItems() { if (\Yii::$app->user->isGuest) { $session = \Yii::$app->session; $products = $session[self::SESSION_KEY]; } else { $order = Order::find()->where(['user_id' => \Yii::$app->user->id, 'status' => OrderStatus::STATUS_INCOMPLETE])->one...
php
public function getOrderItems() { if (\Yii::$app->user->isGuest) { $session = \Yii::$app->session; $products = $session[self::SESSION_KEY]; } else { $order = Order::find()->where(['user_id' => \Yii::$app->user->id, 'status' => OrderStatus::STATUS_INCOMPLETE])->one...
[ "public", "function", "getOrderItems", "(", ")", "{", "if", "(", "\\", "Yii", "::", "$", "app", "->", "user", "->", "isGuest", ")", "{", "$", "session", "=", "\\", "Yii", "::", "$", "app", "->", "session", ";", "$", "products", "=", "$", "session",...
Gets order items. @return array|bool|mixed|\yii\db\ActiveRecord[]
[ "Gets", "order", "items", "." ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L431-L442
199,810
black-lamp/blcms-cart
CartComponent.php
CartComponent.getOrderItemsCount
public function getOrderItemsCount() { if (\Yii::$app->user->isGuest) { $session = \Yii::$app->session; return count($session[self::SESSION_KEY]); } else { $order = Order::find()->where(['user_id' => \Yii::$app->user->id, 'status' => OrderStatus::STATUS_INCOMPLETE...
php
public function getOrderItemsCount() { if (\Yii::$app->user->isGuest) { $session = \Yii::$app->session; return count($session[self::SESSION_KEY]); } else { $order = Order::find()->where(['user_id' => \Yii::$app->user->id, 'status' => OrderStatus::STATUS_INCOMPLETE...
[ "public", "function", "getOrderItemsCount", "(", ")", "{", "if", "(", "\\", "Yii", "::", "$", "app", "->", "user", "->", "isGuest", ")", "{", "$", "session", "=", "\\", "Yii", "::", "$", "app", "->", "session", ";", "return", "count", "(", "$", "se...
Gets order items count. @return integer
[ "Gets", "order", "items", "count", "." ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L449-L463
199,811
black-lamp/blcms-cart
CartComponent.php
CartComponent.getAllUserOrders
public function getAllUserOrders() { if (!\Yii::$app->user->isGuest && $this->saveToDataBase === true) { $orders = Order::find() ->where(['user_id' => \Yii::$app->user->id]) ->andWhere(['!=', 'status', OrderStatus::STATUS_INCOMPLETE])->all(); return $o...
php
public function getAllUserOrders() { if (!\Yii::$app->user->isGuest && $this->saveToDataBase === true) { $orders = Order::find() ->where(['user_id' => \Yii::$app->user->id]) ->andWhere(['!=', 'status', OrderStatus::STATUS_INCOMPLETE])->all(); return $o...
[ "public", "function", "getAllUserOrders", "(", ")", "{", "if", "(", "!", "\\", "Yii", "::", "$", "app", "->", "user", "->", "isGuest", "&&", "$", "this", "->", "saveToDataBase", "===", "true", ")", "{", "$", "orders", "=", "Order", "::", "find", "(",...
Gets all user orders from database. @return bool|\yii\db\ActiveRecord[]
[ "Gets", "all", "user", "orders", "from", "database", "." ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L470-L478
199,812
black-lamp/blcms-cart
CartComponent.php
CartComponent.removeItem
public function removeItem(int $productId, int $combinationId = null) { if (!\Yii::$app->user->isGuest) { $order = Order::find()->where([ 'user_id' => \Yii::$app->user->id, 'status' => OrderStatus::STATUS_INCOMPLETE ])->one(); if (!empty($o...
php
public function removeItem(int $productId, int $combinationId = null) { if (!\Yii::$app->user->isGuest) { $order = Order::find()->where([ 'user_id' => \Yii::$app->user->id, 'status' => OrderStatus::STATUS_INCOMPLETE ])->one(); if (!empty($o...
[ "public", "function", "removeItem", "(", "int", "$", "productId", ",", "int", "$", "combinationId", "=", "null", ")", "{", "if", "(", "!", "\\", "Yii", "::", "$", "app", "->", "user", "->", "isGuest", ")", "{", "$", "order", "=", "Order", "::", "fi...
Removes item from order. @param $productId integer @param $combinationId integer
[ "Removes", "item", "from", "order", "." ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L485-L513
199,813
black-lamp/blcms-cart
CartComponent.php
CartComponent.getIncompleteOrder
public function getIncompleteOrder() { if (!\Yii::$app->user->isGuest) { $user = User::findOne(\Yii::$app->user->id); $order = Order::find() ->where(['user_id' => $user->id, 'status' => OrderStatus::STATUS_INCOMPLETE]) ->one(); if (!empty($...
php
public function getIncompleteOrder() { if (!\Yii::$app->user->isGuest) { $user = User::findOne(\Yii::$app->user->id); $order = Order::find() ->where(['user_id' => $user->id, 'status' => OrderStatus::STATUS_INCOMPLETE]) ->one(); if (!empty($...
[ "public", "function", "getIncompleteOrder", "(", ")", "{", "if", "(", "!", "\\", "Yii", "::", "$", "app", "->", "user", "->", "isGuest", ")", "{", "$", "user", "=", "User", "::", "findOne", "(", "\\", "Yii", "::", "$", "app", "->", "user", "->", ...
Gets registered user's incomplete order @return array|Order|null
[ "Gets", "registered", "user", "s", "incomplete", "order" ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L519-L531
199,814
black-lamp/blcms-cart
CartComponent.php
CartComponent.clearCart
public function clearCart() { if (!\Yii::$app->user->isGuest && $this->saveToDataBase === true) { $order = Order::find()->where(['user_id' => \Yii::$app->user->id, 'status' => OrderStatus::STATUS_INCOMPLETE])->one(); if (!empty($order)) $order->delete(); } els...
php
public function clearCart() { if (!\Yii::$app->user->isGuest && $this->saveToDataBase === true) { $order = Order::find()->where(['user_id' => \Yii::$app->user->id, 'status' => OrderStatus::STATUS_INCOMPLETE])->one(); if (!empty($order)) $order->delete(); } els...
[ "public", "function", "clearCart", "(", ")", "{", "if", "(", "!", "\\", "Yii", "::", "$", "app", "->", "user", "->", "isGuest", "&&", "$", "this", "->", "saveToDataBase", "===", "true", ")", "{", "$", "order", "=", "Order", "::", "find", "(", ")", ...
Clears cart.
[ "Clears", "cart", "." ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L700-L711
199,815
black-lamp/blcms-cart
CartComponent.php
CartComponent.getCost
public function getCost() { $totalCost = 0; if (Yii::$app->user->isGuest) { //Gets products from session $session = Yii::$app->session; $products = $session[self::SESSION_KEY]; if (!empty($products)) { foreach ($products as $product) { ...
php
public function getCost() { $totalCost = 0; if (Yii::$app->user->isGuest) { //Gets products from session $session = Yii::$app->session; $products = $session[self::SESSION_KEY]; if (!empty($products)) { foreach ($products as $product) { ...
[ "public", "function", "getCost", "(", ")", "{", "$", "totalCost", "=", "0", ";", "if", "(", "Yii", "::", "$", "app", "->", "user", "->", "isGuest", ")", "{", "//Gets products from session", "$", "session", "=", "Yii", "::", "$", "app", "->", "session",...
Gets cost of user's incomplete order without discounts @return mixed
[ "Gets", "cost", "of", "user", "s", "incomplete", "order", "without", "discounts" ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L763-L819
199,816
black-lamp/blcms-cart
CartComponent.php
CartComponent.getTotalCost
public function getTotalCost() { $totalCost = $this->getCost(); $adjustmentTotal = 0; foreach ($this->adjustments as $adjustment) { $adjustmentObject = Yii::createObject($adjustment); if($adjustmentObject instanceof CartSumAdjustment) { $adjustmentTotal +...
php
public function getTotalCost() { $totalCost = $this->getCost(); $adjustmentTotal = 0; foreach ($this->adjustments as $adjustment) { $adjustmentObject = Yii::createObject($adjustment); if($adjustmentObject instanceof CartSumAdjustment) { $adjustmentTotal +...
[ "public", "function", "getTotalCost", "(", ")", "{", "$", "totalCost", "=", "$", "this", "->", "getCost", "(", ")", ";", "$", "adjustmentTotal", "=", "0", ";", "foreach", "(", "$", "this", "->", "adjustments", "as", "$", "adjustment", ")", "{", "$", ...
Gets total cost of user's incomplete order from session if user is guest or from DB if user is authenticated @return mixed
[ "Gets", "total", "cost", "of", "user", "s", "incomplete", "order", "from", "session", "if", "user", "is", "guest", "or", "from", "DB", "if", "user", "is", "authenticated" ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L826-L838
199,817
black-lamp/blcms-cart
CartComponent.php
CartComponent.isContainsProduct
public function isContainsProduct($productId, $combinationId = null) { if (Yii::$app->user->isGuest) { if (!empty(Yii::$app->session[self::SESSION_KEY])) { $sessionProducts = Yii::$app->session[self::SESSION_KEY]; foreach ($sessionProducts as $item) { ...
php
public function isContainsProduct($productId, $combinationId = null) { if (Yii::$app->user->isGuest) { if (!empty(Yii::$app->session[self::SESSION_KEY])) { $sessionProducts = Yii::$app->session[self::SESSION_KEY]; foreach ($sessionProducts as $item) { ...
[ "public", "function", "isContainsProduct", "(", "$", "productId", ",", "$", "combinationId", "=", "null", ")", "{", "if", "(", "Yii", "::", "$", "app", "->", "user", "->", "isGuest", ")", "{", "if", "(", "!", "empty", "(", "Yii", "::", "$", "app", ...
Checks if the cart contains the product. @param integer $productId [[Product]] id. @param null|integer $combinationId [[Combination]] id. @return bool whether the cart contains the product
[ "Checks", "if", "the", "cart", "contains", "the", "product", "." ]
314796eecae3ca4ed5fecfdc0231a738af50eba7
https://github.com/black-lamp/blcms-cart/blob/314796eecae3ca4ed5fecfdc0231a738af50eba7/CartComponent.php#L1041-L1077
199,818
Vectrex/vxPHP
src/Session/Session.php
Session.init
public static function init() { if(is_null(self::$storage)) { self::$storage = new NativeSessionStorage(); } self::$storage->start(); }
php
public static function init() { if(is_null(self::$storage)) { self::$storage = new NativeSessionStorage(); } self::$storage->start(); }
[ "public", "static", "function", "init", "(", ")", "{", "if", "(", "is_null", "(", "self", "::", "$", "storage", ")", ")", "{", "self", "::", "$", "storage", "=", "new", "NativeSessionStorage", "(", ")", ";", "}", "self", "::", "$", "storage", "->", ...
initialize session storage mechanism currently only wraps PHP native session storage
[ "initialize", "session", "storage", "mechanism", "currently", "only", "wraps", "PHP", "native", "session", "storage" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Session/Session.php#L28-L36
199,819
SteeinRu/steein-sdk-php
src/Steein/SDK/Security/Cipher.php
Cipher.decrypt
public function decrypt($input) { // Decode the IV + data $input = base64_decode($input); // Remove the IV $iv = substr($input, 0, Cipher::IV_SIZE); // Return Decrypted Data return openssl_decrypt(substr($input, Cipher::IV_SIZE), "AES-256-CBC", $this->secretKey, 0, $i...
php
public function decrypt($input) { // Decode the IV + data $input = base64_decode($input); // Remove the IV $iv = substr($input, 0, Cipher::IV_SIZE); // Return Decrypted Data return openssl_decrypt(substr($input, Cipher::IV_SIZE), "AES-256-CBC", $this->secretKey, 0, $i...
[ "public", "function", "decrypt", "(", "$", "input", ")", "{", "// Decode the IV + data", "$", "input", "=", "base64_decode", "(", "$", "input", ")", ";", "// Remove the IV", "$", "iv", "=", "substr", "(", "$", "input", ",", "0", ",", "Cipher", "::", "IV_...
Decrypts the input text from the cipher key @param $input @return string
[ "Decrypts", "the", "input", "text", "from", "the", "cipher", "key" ]
27113624a6582d27bb55d7c9724e8306739ef167
https://github.com/SteeinRu/steein-sdk-php/blob/27113624a6582d27bb55d7c9724e8306739ef167/src/Steein/SDK/Security/Cipher.php#L75-L83
199,820
BartoszBartniczak/ArrayOfObjects
src/ArrayObject/ArrayObject.php
ArrayObject.filter
public function filter(callable $callback): ArrayObject { $arrayCopy = $this->getArrayCopy(); $filteredData = array_filter($arrayCopy, $callback); return new ArrayObject($filteredData); }
php
public function filter(callable $callback): ArrayObject { $arrayCopy = $this->getArrayCopy(); $filteredData = array_filter($arrayCopy, $callback); return new ArrayObject($filteredData); }
[ "public", "function", "filter", "(", "callable", "$", "callback", ")", ":", "ArrayObject", "{", "$", "arrayCopy", "=", "$", "this", "->", "getArrayCopy", "(", ")", ";", "$", "filteredData", "=", "array_filter", "(", "$", "arrayCopy", ",", "$", "callback", ...
Iterates over each value in the array passing them to the callback function. If the callback function returns true, the current value from array is returned into the result ArrayObject. Array keys are preserved. @param callable $callback @return ArrayObject
[ "Iterates", "over", "each", "value", "in", "the", "array", "passing", "them", "to", "the", "callback", "function", ".", "If", "the", "callback", "function", "returns", "true", "the", "current", "value", "from", "array", "is", "returned", "into", "the", "resu...
8758d3230d876c7d18d6753fd28ac8ef6de301c4
https://github.com/BartoszBartniczak/ArrayOfObjects/blob/8758d3230d876c7d18d6753fd28ac8ef6de301c4/src/ArrayObject/ArrayObject.php#L65-L70
199,821
BartoszBartniczak/ArrayOfObjects
src/ArrayObject/ArrayObject.php
ArrayObject.first
public function first() { $this->throwExceptionIfEmpty(); $keys = $this->keys(); $keyOfTheFirstElement = $keys->shift(); return $this->offsetGet($keyOfTheFirstElement); }
php
public function first() { $this->throwExceptionIfEmpty(); $keys = $this->keys(); $keyOfTheFirstElement = $keys->shift(); return $this->offsetGet($keyOfTheFirstElement); }
[ "public", "function", "first", "(", ")", "{", "$", "this", "->", "throwExceptionIfEmpty", "(", ")", ";", "$", "keys", "=", "$", "this", "->", "keys", "(", ")", ";", "$", "keyOfTheFirstElement", "=", "$", "keys", "->", "shift", "(", ")", ";", "return"...
Returns the first element, ignoring the type of the keys. @return mixed
[ "Returns", "the", "first", "element", "ignoring", "the", "type", "of", "the", "keys", "." ]
8758d3230d876c7d18d6753fd28ac8ef6de301c4
https://github.com/BartoszBartniczak/ArrayOfObjects/blob/8758d3230d876c7d18d6753fd28ac8ef6de301c4/src/ArrayObject/ArrayObject.php#L87-L94
199,822
BartoszBartniczak/ArrayOfObjects
src/ArrayObject/ArrayObject.php
ArrayObject.shift
public function shift() { $this->throwExceptionIfEmpty(); $arrayCopy = $this->getArrayCopy(); $firstElement = array_shift($arrayCopy); $this->exchangeArray($arrayCopy); return $firstElement; }
php
public function shift() { $this->throwExceptionIfEmpty(); $arrayCopy = $this->getArrayCopy(); $firstElement = array_shift($arrayCopy); $this->exchangeArray($arrayCopy); return $firstElement; }
[ "public", "function", "shift", "(", ")", "{", "$", "this", "->", "throwExceptionIfEmpty", "(", ")", ";", "$", "arrayCopy", "=", "$", "this", "->", "getArrayCopy", "(", ")", ";", "$", "firstElement", "=", "array_shift", "(", "$", "arrayCopy", ")", ";", ...
Shift an element off the beginning of array @return mixed
[ "Shift", "an", "element", "off", "the", "beginning", "of", "array" ]
8758d3230d876c7d18d6753fd28ac8ef6de301c4
https://github.com/BartoszBartniczak/ArrayOfObjects/blob/8758d3230d876c7d18d6753fd28ac8ef6de301c4/src/ArrayObject/ArrayObject.php#L137-L145
199,823
BartoszBartniczak/ArrayOfObjects
src/ArrayObject/ArrayObject.php
ArrayObject.last
public function last() { $this->throwExceptionIfEmpty(); $keys = $this->keys(); $keyOfTheLastElement = $keys->pop(); return $this->offsetGet($keyOfTheLastElement); }
php
public function last() { $this->throwExceptionIfEmpty(); $keys = $this->keys(); $keyOfTheLastElement = $keys->pop(); return $this->offsetGet($keyOfTheLastElement); }
[ "public", "function", "last", "(", ")", "{", "$", "this", "->", "throwExceptionIfEmpty", "(", ")", ";", "$", "keys", "=", "$", "this", "->", "keys", "(", ")", ";", "$", "keyOfTheLastElement", "=", "$", "keys", "->", "pop", "(", ")", ";", "return", ...
Returns the last element, ignoring the type of the keys. @return mixed
[ "Returns", "the", "last", "element", "ignoring", "the", "type", "of", "the", "keys", "." ]
8758d3230d876c7d18d6753fd28ac8ef6de301c4
https://github.com/BartoszBartniczak/ArrayOfObjects/blob/8758d3230d876c7d18d6753fd28ac8ef6de301c4/src/ArrayObject/ArrayObject.php#L151-L158
199,824
BartoszBartniczak/ArrayOfObjects
src/ArrayObject/ArrayObject.php
ArrayObject.pop
public function pop() { $this->throwExceptionIfEmpty(); $arrayCopy = $this->getArrayCopy(); $lastElement = array_pop($arrayCopy); $this->exchangeArray($arrayCopy); return $lastElement; }
php
public function pop() { $this->throwExceptionIfEmpty(); $arrayCopy = $this->getArrayCopy(); $lastElement = array_pop($arrayCopy); $this->exchangeArray($arrayCopy); return $lastElement; }
[ "public", "function", "pop", "(", ")", "{", "$", "this", "->", "throwExceptionIfEmpty", "(", ")", ";", "$", "arrayCopy", "=", "$", "this", "->", "getArrayCopy", "(", ")", ";", "$", "lastElement", "=", "array_pop", "(", "$", "arrayCopy", ")", ";", "$", ...
Pop the element off the end of array @return mixed @throws EmptyArrayException
[ "Pop", "the", "element", "off", "the", "end", "of", "array" ]
8758d3230d876c7d18d6753fd28ac8ef6de301c4
https://github.com/BartoszBartniczak/ArrayOfObjects/blob/8758d3230d876c7d18d6753fd28ac8ef6de301c4/src/ArrayObject/ArrayObject.php#L165-L173
199,825
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Source.php
Source.initCategories
public function initCategories($overrideExisting = true) { if (null !== $this->collCategories && !$overrideExisting) { return; } $collectionClassName = CategoryTableMap::getTableMap()->getCollectionClassName(); $this->collCategories = new $collectionClassName; $...
php
public function initCategories($overrideExisting = true) { if (null !== $this->collCategories && !$overrideExisting) { return; } $collectionClassName = CategoryTableMap::getTableMap()->getCollectionClassName(); $this->collCategories = new $collectionClassName; $...
[ "public", "function", "initCategories", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collCategories", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "collectionClassName", "=", "...
Initializes the collCategories collection. By default this just sets the collCategories collection to an empty array (like clearcollCategories()); however, you may wish to override this method in your stub class to provide setting appropriate to your application -- for example, setting the initial array to the values ...
[ "Initializes", "the", "collCategories", "collection", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Source.php#L1502-L1512
199,826
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Source.php
Source.getCategories
public function getCategories(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collCategoriesPartial && !$this->isNew(); if (null === $this->collCategories || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collCategories) { ...
php
public function getCategories(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collCategoriesPartial && !$this->isNew(); if (null === $this->collCategories || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collCategories) { ...
[ "public", "function", "getCategories", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collCategoriesPartial", "&&", "!", "$", "this", "->", "isNew", "("...
Gets an array of ChildCategory objects which contain a foreign key that references this object. If the $criteria is not null, it is used to always fetch the results from the database. Otherwise the results are fetched from the database the first time, then cached. Next time the same method is called without $criteria,...
[ "Gets", "an", "array", "of", "ChildCategory", "objects", "which", "contain", "a", "foreign", "key", "that", "references", "this", "object", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Source.php#L1528-L1570
199,827
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Source.php
Source.countCategories
public function countCategories(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collCategoriesPartial && !$this->isNew(); if (null === $this->collCategories || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collC...
php
public function countCategories(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collCategoriesPartial && !$this->isNew(); if (null === $this->collCategories || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collC...
[ "public", "function", "countCategories", "(", "Criteria", "$", "criteria", "=", "null", ",", "$", "distinct", "=", "false", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collCategoriesPartial", "&&", ...
Returns the number of related Category objects. @param Criteria $criteria @param boolean $distinct @param ConnectionInterface $con @return int Count of related Category objects. @throws PropelException
[ "Returns", "the", "number", "of", "related", "Category", "objects", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Source.php#L1614-L1637
199,828
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Source.php
Source.addCategory
public function addCategory(ChildCategory $l) { if ($this->collCategories === null) { $this->initCategories(); $this->collCategoriesPartial = true; } if (!$this->collCategories->contains($l)) { $this->doAddCategory($l); if ($this->categoriesS...
php
public function addCategory(ChildCategory $l) { if ($this->collCategories === null) { $this->initCategories(); $this->collCategoriesPartial = true; } if (!$this->collCategories->contains($l)) { $this->doAddCategory($l); if ($this->categoriesS...
[ "public", "function", "addCategory", "(", "ChildCategory", "$", "l", ")", "{", "if", "(", "$", "this", "->", "collCategories", "===", "null", ")", "{", "$", "this", "->", "initCategories", "(", ")", ";", "$", "this", "->", "collCategoriesPartial", "=", "...
Method called to associate a ChildCategory object to this object through the ChildCategory foreign key attribute. @param ChildCategory $l ChildCategory @return $this|\Attogram\SharedMedia\Orm\Source The current object (for fluent API support)
[ "Method", "called", "to", "associate", "a", "ChildCategory", "object", "to", "this", "object", "through", "the", "ChildCategory", "foreign", "key", "attribute", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Source.php#L1646-L1662
199,829
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Source.php
Source.initMedias
public function initMedias($overrideExisting = true) { if (null !== $this->collMedias && !$overrideExisting) { return; } $collectionClassName = MediaTableMap::getTableMap()->getCollectionClassName(); $this->collMedias = new $collectionClassName; $this->collMedia...
php
public function initMedias($overrideExisting = true) { if (null !== $this->collMedias && !$overrideExisting) { return; } $collectionClassName = MediaTableMap::getTableMap()->getCollectionClassName(); $this->collMedias = new $collectionClassName; $this->collMedia...
[ "public", "function", "initMedias", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collMedias", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "collectionClassName", "=", "MediaTab...
Initializes the collMedias collection. By default this just sets the collMedias collection to an empty array (like clearcollMedias()); however, you may wish to override this method in your stub class to provide setting appropriate to your application -- for example, setting the initial array to the values stored in da...
[ "Initializes", "the", "collMedias", "collection", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Source.php#L1727-L1737
199,830
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Source.php
Source.getMedias
public function getMedias(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collMediasPartial && !$this->isNew(); if (null === $this->collMedias || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collMedias) { // retu...
php
public function getMedias(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collMediasPartial && !$this->isNew(); if (null === $this->collMedias || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collMedias) { // retu...
[ "public", "function", "getMedias", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collMediasPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")",...
Gets an array of ChildMedia objects which contain a foreign key that references this object. If the $criteria is not null, it is used to always fetch the results from the database. Otherwise the results are fetched from the database the first time, then cached. Next time the same method is called without $criteria, th...
[ "Gets", "an", "array", "of", "ChildMedia", "objects", "which", "contain", "a", "foreign", "key", "that", "references", "this", "object", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Source.php#L1753-L1795
199,831
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Source.php
Source.countMedias
public function countMedias(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collMediasPartial && !$this->isNew(); if (null === $this->collMedias || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collMedias) { ...
php
public function countMedias(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collMediasPartial && !$this->isNew(); if (null === $this->collMedias || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collMedias) { ...
[ "public", "function", "countMedias", "(", "Criteria", "$", "criteria", "=", "null", ",", "$", "distinct", "=", "false", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collMediasPartial", "&&", "!", ...
Returns the number of related Media objects. @param Criteria $criteria @param boolean $distinct @param ConnectionInterface $con @return int Count of related Media objects. @throws PropelException
[ "Returns", "the", "number", "of", "related", "Media", "objects", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Source.php#L1839-L1862
199,832
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Source.php
Source.addMedia
public function addMedia(ChildMedia $l) { if ($this->collMedias === null) { $this->initMedias(); $this->collMediasPartial = true; } if (!$this->collMedias->contains($l)) { $this->doAddMedia($l); if ($this->mediasScheduledForDeletion and $this...
php
public function addMedia(ChildMedia $l) { if ($this->collMedias === null) { $this->initMedias(); $this->collMediasPartial = true; } if (!$this->collMedias->contains($l)) { $this->doAddMedia($l); if ($this->mediasScheduledForDeletion and $this...
[ "public", "function", "addMedia", "(", "ChildMedia", "$", "l", ")", "{", "if", "(", "$", "this", "->", "collMedias", "===", "null", ")", "{", "$", "this", "->", "initMedias", "(", ")", ";", "$", "this", "->", "collMediasPartial", "=", "true", ";", "}...
Method called to associate a ChildMedia object to this object through the ChildMedia foreign key attribute. @param ChildMedia $l ChildMedia @return $this|\Attogram\SharedMedia\Orm\Source The current object (for fluent API support)
[ "Method", "called", "to", "associate", "a", "ChildMedia", "object", "to", "this", "object", "through", "the", "ChildMedia", "foreign", "key", "attribute", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Source.php#L1871-L1887
199,833
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Source.php
Source.initPages
public function initPages($overrideExisting = true) { if (null !== $this->collPages && !$overrideExisting) { return; } $collectionClassName = PageTableMap::getTableMap()->getCollectionClassName(); $this->collPages = new $collectionClassName; $this->collPages->se...
php
public function initPages($overrideExisting = true) { if (null !== $this->collPages && !$overrideExisting) { return; } $collectionClassName = PageTableMap::getTableMap()->getCollectionClassName(); $this->collPages = new $collectionClassName; $this->collPages->se...
[ "public", "function", "initPages", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collPages", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "collectionClassName", "=", "PageTableM...
Initializes the collPages collection. By default this just sets the collPages collection to an empty array (like clearcollPages()); however, you may wish to override this method in your stub class to provide setting appropriate to your application -- for example, setting the initial array to the values stored in datab...
[ "Initializes", "the", "collPages", "collection", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Source.php#L1952-L1962
199,834
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Source.php
Source.getPages
public function getPages(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collPagesPartial && !$this->isNew(); if (null === $this->collPages || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collPages) { // return e...
php
public function getPages(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collPagesPartial && !$this->isNew(); if (null === $this->collPages || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collPages) { // return e...
[ "public", "function", "getPages", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collPagesPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ...
Gets an array of ChildPage objects which contain a foreign key that references this object. If the $criteria is not null, it is used to always fetch the results from the database. Otherwise the results are fetched from the database the first time, then cached. Next time the same method is called without $criteria, the...
[ "Gets", "an", "array", "of", "ChildPage", "objects", "which", "contain", "a", "foreign", "key", "that", "references", "this", "object", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Source.php#L1978-L2020
199,835
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Source.php
Source.countPages
public function countPages(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collPagesPartial && !$this->isNew(); if (null === $this->collPages || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collPages) { ...
php
public function countPages(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collPagesPartial && !$this->isNew(); if (null === $this->collPages || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collPages) { ...
[ "public", "function", "countPages", "(", "Criteria", "$", "criteria", "=", "null", ",", "$", "distinct", "=", "false", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collPagesPartial", "&&", "!", "...
Returns the number of related Page objects. @param Criteria $criteria @param boolean $distinct @param ConnectionInterface $con @return int Count of related Page objects. @throws PropelException
[ "Returns", "the", "number", "of", "related", "Page", "objects", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Source.php#L2064-L2087
199,836
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/Source.php
Source.addPage
public function addPage(ChildPage $l) { if ($this->collPages === null) { $this->initPages(); $this->collPagesPartial = true; } if (!$this->collPages->contains($l)) { $this->doAddPage($l); if ($this->pagesScheduledForDeletion and $this->pagesS...
php
public function addPage(ChildPage $l) { if ($this->collPages === null) { $this->initPages(); $this->collPagesPartial = true; } if (!$this->collPages->contains($l)) { $this->doAddPage($l); if ($this->pagesScheduledForDeletion and $this->pagesS...
[ "public", "function", "addPage", "(", "ChildPage", "$", "l", ")", "{", "if", "(", "$", "this", "->", "collPages", "===", "null", ")", "{", "$", "this", "->", "initPages", "(", ")", ";", "$", "this", "->", "collPagesPartial", "=", "true", ";", "}", ...
Method called to associate a ChildPage object to this object through the ChildPage foreign key attribute. @param ChildPage $l ChildPage @return $this|\Attogram\SharedMedia\Orm\Source The current object (for fluent API support)
[ "Method", "called", "to", "associate", "a", "ChildPage", "object", "to", "this", "object", "through", "the", "ChildPage", "foreign", "key", "attribute", "." ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/Source.php#L2096-L2112
199,837
translationexchange/tml-php-clientsdk
library/Tr8n/Application.php
Application.submitMissingKeys
public function submitMissingKeys() { if ($this->missing_keys_by_sources == null) return; $params = array(); $source_keys = array(); foreach($this->missing_keys_by_sources as $source => $keys) { array_push($source_keys, $source); $keys_data = array()...
php
public function submitMissingKeys() { if ($this->missing_keys_by_sources == null) return; $params = array(); $source_keys = array(); foreach($this->missing_keys_by_sources as $source => $keys) { array_push($source_keys, $source); $keys_data = array()...
[ "public", "function", "submitMissingKeys", "(", ")", "{", "if", "(", "$", "this", "->", "missing_keys_by_sources", "==", "null", ")", "return", ";", "$", "params", "=", "array", "(", ")", ";", "$", "source_keys", "=", "array", "(", ")", ";", "foreach", ...
Submits missing keys to the service
[ "Submits", "missing", "keys", "to", "the", "service" ]
fe51473824e62cfd883c6aa0c6a3783a16ce8425
https://github.com/translationexchange/tml-php-clientsdk/blob/fe51473824e62cfd883c6aa0c6a3783a16ce8425/library/Tr8n/Application.php#L393-L427
199,838
phpffcms/ffcms-core
src/Migrations/Migration.php
Migration.up
public function up() { $record = new MigrationRecord(); if ($this->connection !== null) { $record->setConnection($this->connection); } $record->migration = $this->name; $record->save(); }
php
public function up() { $record = new MigrationRecord(); if ($this->connection !== null) { $record->setConnection($this->connection); } $record->migration = $this->name; $record->save(); }
[ "public", "function", "up", "(", ")", "{", "$", "record", "=", "new", "MigrationRecord", "(", ")", ";", "if", "(", "$", "this", "->", "connection", "!==", "null", ")", "{", "$", "record", "->", "setConnection", "(", "$", "this", "->", "connection", "...
Insert data into migration table
[ "Insert", "data", "into", "migration", "table" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Migrations/Migration.php#L35-L43
199,839
phpffcms/ffcms-core
src/Migrations/Migration.php
Migration.down
public function down() { $record = new MigrationRecord(); if ($this->connection !== null) { $record->setConnection($this->connection); } $record->where('migration', $this->name)->delete(); }
php
public function down() { $record = new MigrationRecord(); if ($this->connection !== null) { $record->setConnection($this->connection); } $record->where('migration', $this->name)->delete(); }
[ "public", "function", "down", "(", ")", "{", "$", "record", "=", "new", "MigrationRecord", "(", ")", ";", "if", "(", "$", "this", "->", "connection", "!==", "null", ")", "{", "$", "record", "->", "setConnection", "(", "$", "this", "->", "connection", ...
Remove data from migration table
[ "Remove", "data", "from", "migration", "table" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Migrations/Migration.php#L48-L55
199,840
Gravitas-GM/PluginBase
src/Gravitas/PluginBase/PluginBase.php
PluginBase.run
public function run() { $this->execute(); if ($handler = $this->getFormHandler(@$_REQUEST['_form_name'])) call_user_func($handler, $_REQUEST); }
php
public function run() { $this->execute(); if ($handler = $this->getFormHandler(@$_REQUEST['_form_name'])) call_user_func($handler, $_REQUEST); }
[ "public", "function", "run", "(", ")", "{", "$", "this", "->", "execute", "(", ")", ";", "if", "(", "$", "handler", "=", "$", "this", "->", "getFormHandler", "(", "@", "$", "_REQUEST", "[", "'_form_name'", "]", ")", ")", "call_user_func", "(", "$", ...
The entry point for a plugin. This should be called immediately in your bootstrap file.
[ "The", "entry", "point", "for", "a", "plugin", ".", "This", "should", "be", "called", "immediately", "in", "your", "bootstrap", "file", "." ]
a7ca0cf6b286a547a5c7de919cd4423520ed9f06
https://github.com/Gravitas-GM/PluginBase/blob/a7ca0cf6b286a547a5c7de919cd4423520ed9f06/src/Gravitas/PluginBase/PluginBase.php#L41-L46
199,841
Gravitas-GM/PluginBase
src/Gravitas/PluginBase/PluginBase.php
PluginBase.addResources
public function addResources() { if ($this->resourceChain === null) $this->resourceChain = new ResourceChain($this); return $this->resourceChain; }
php
public function addResources() { if ($this->resourceChain === null) $this->resourceChain = new ResourceChain($this); return $this->resourceChain; }
[ "public", "function", "addResources", "(", ")", "{", "if", "(", "$", "this", "->", "resourceChain", "===", "null", ")", "$", "this", "->", "resourceChain", "=", "new", "ResourceChain", "(", "$", "this", ")", ";", "return", "$", "this", "->", "resourceCha...
Returns a ResourceChain object that can be used to add stylesheets and scripts. Functionally, this is the same as calling `add*Script` and `add*Stylesheet` methods, except that it automatically registers all previously registered resources (added via the ResourceChain) as dependencies. @return ResourceChain
[ "Returns", "a", "ResourceChain", "object", "that", "can", "be", "used", "to", "add", "stylesheets", "and", "scripts", "." ]
a7ca0cf6b286a547a5c7de919cd4423520ed9f06
https://github.com/Gravitas-GM/PluginBase/blob/a7ca0cf6b286a547a5c7de919cd4423520ed9f06/src/Gravitas/PluginBase/PluginBase.php#L165-L170
199,842
johnkrovitch/Sam
Filter/Copy/CopyFilter.php
CopyFilter.run
public function run(array $sources, array $destinations) { $fileSystem = new Filesystem(); // must have the same sources and destinations number if (count($sources) !== count($destinations) && count($destinations) !== 1) { throw new Exception('Sources and destinations co...
php
public function run(array $sources, array $destinations) { $fileSystem = new Filesystem(); // must have the same sources and destinations number if (count($sources) !== count($destinations) && count($destinations) !== 1) { throw new Exception('Sources and destinations co...
[ "public", "function", "run", "(", "array", "$", "sources", ",", "array", "$", "destinations", ")", "{", "$", "fileSystem", "=", "new", "Filesystem", "(", ")", ";", "// must have the same sources and destinations number", "if", "(", "count", "(", "$", "sources", ...
Copy the sources files to the destinations. @param SplFileInfo[] $sources @param string[] $destinations @return SplFileInfo[] @throws Exception
[ "Copy", "the", "sources", "files", "to", "the", "destinations", "." ]
fbd3770c11eecc0a6d8070f439f149062316f606
https://github.com/johnkrovitch/Sam/blob/fbd3770c11eecc0a6d8070f439f149062316f606/Filter/Copy/CopyFilter.php#L22-L62
199,843
valu-digital/valusetup
src/ValuSetup/Setup/SetupUtils.php
SetupUtils.install
public function install($module, $version, $options = null) { $module = strtolower($module); $options = is_null($options) ? array() : $options; $modules = $this->findModules(); $current = array(); foreach($modules as $name){ $modVersion = $this->getM...
php
public function install($module, $version, $options = null) { $module = strtolower($module); $options = is_null($options) ? array() : $options; $modules = $this->findModules(); $current = array(); foreach($modules as $name){ $modVersion = $this->getM...
[ "public", "function", "install", "(", "$", "module", ",", "$", "version", ",", "$", "options", "=", "null", ")", "{", "$", "module", "=", "strtolower", "(", "$", "module", ")", ";", "$", "options", "=", "is_null", "(", "$", "options", ")", "?", "ar...
Install module dependencies @return void
[ "Install", "module", "dependencies" ]
db1a0bfe1262d555eb11cd0d99625b9ee43d6744
https://github.com/valu-digital/valusetup/blob/db1a0bfe1262d555eb11cd0d99625b9ee43d6744/src/ValuSetup/Setup/SetupUtils.php#L60-L116
199,844
valu-digital/valusetup
src/ValuSetup/Setup/SetupUtils.php
SetupUtils.resolveDependencies
public function resolveDependencies($module){ $version = $this->getModuleVersion($module); if(null === $version){ throw new \Exception(sprintf( "Unable to resolve dependencies for module '%s'. Module definitions are missing or incomplete.", ...
php
public function resolveDependencies($module){ $version = $this->getModuleVersion($module); if(null === $version){ throw new \Exception(sprintf( "Unable to resolve dependencies for module '%s'. Module definitions are missing or incomplete.", ...
[ "public", "function", "resolveDependencies", "(", "$", "module", ")", "{", "$", "version", "=", "$", "this", "->", "getModuleVersion", "(", "$", "module", ")", ";", "if", "(", "null", "===", "$", "version", ")", "{", "throw", "new", "\\", "Exception", ...
Resolve module dependencies, recursively This method returns an array with dependent module names as keys and versions as values. There may also be a dependency back to module itself with greater version number. Example of dependency tree: - A 1.0 - C 1.0 - A 1.1 - D 2.0 - E 1.0 - B 1.0 - B 1.1 Resolved dependencies...
[ "Resolve", "module", "dependencies", "recursively" ]
db1a0bfe1262d555eb11cd0d99625b9ee43d6744
https://github.com/valu-digital/valusetup/blob/db1a0bfe1262d555eb11cd0d99625b9ee43d6744/src/ValuSetup/Setup/SetupUtils.php#L216-L237
199,845
valu-digital/valusetup
src/ValuSetup/Setup/SetupUtils.php
SetupUtils.resolveDepsRecursive
protected function resolveDepsRecursive($module, $version, \ArrayObject $resolved){ $module = strtolower($module); // replace if exists with lower version number if($resolved->offsetExists($module)){ $new = new SoftwareVersion($version); // remembe...
php
protected function resolveDepsRecursive($module, $version, \ArrayObject $resolved){ $module = strtolower($module); // replace if exists with lower version number if($resolved->offsetExists($module)){ $new = new SoftwareVersion($version); // remembe...
[ "protected", "function", "resolveDepsRecursive", "(", "$", "module", ",", "$", "version", ",", "\\", "ArrayObject", "$", "resolved", ")", "{", "$", "module", "=", "strtolower", "(", "$", "module", ")", ";", "// replace if exists with lower version number", "if", ...
Resolve dependencies recursively. The level and order in module dependency hierarchy defines the module's priority. @param string $module @param string $version @param \ArrayObject $resolved
[ "Resolve", "dependencies", "recursively", ".", "The", "level", "and", "order", "in", "module", "dependency", "hierarchy", "defines", "the", "module", "s", "priority", "." ]
db1a0bfe1262d555eb11cd0d99625b9ee43d6744
https://github.com/valu-digital/valusetup/blob/db1a0bfe1262d555eb11cd0d99625b9ee43d6744/src/ValuSetup/Setup/SetupUtils.php#L247-L284
199,846
valu-digital/valusetup
src/ValuSetup/Setup/SetupUtils.php
SetupUtils.findModules
public function findModules() { $dirs = $this->getOption('module_dirs'); $modules = array(); foreach($dirs as $dir){ $iterator = new DirectoryIterator($dir); foreach ($iterator as $file) { if (($file->isDir() && substr($file->getBasename()...
php
public function findModules() { $dirs = $this->getOption('module_dirs'); $modules = array(); foreach($dirs as $dir){ $iterator = new DirectoryIterator($dir); foreach ($iterator as $file) { if (($file->isDir() && substr($file->getBasename()...
[ "public", "function", "findModules", "(", ")", "{", "$", "dirs", "=", "$", "this", "->", "getOption", "(", "'module_dirs'", ")", ";", "$", "modules", "=", "array", "(", ")", ";", "foreach", "(", "$", "dirs", "as", "$", "dir", ")", "{", "$", "iterat...
Find all modules installed in module directories @return array
[ "Find", "all", "modules", "installed", "in", "module", "directories" ]
db1a0bfe1262d555eb11cd0d99625b9ee43d6744
https://github.com/valu-digital/valusetup/blob/db1a0bfe1262d555eb11cd0d99625b9ee43d6744/src/ValuSetup/Setup/SetupUtils.php#L304-L322
199,847
valu-digital/valusetup
src/ValuSetup/Setup/SetupUtils.php
SetupUtils.whichModule
public function whichModule($object){ $reflection = new \ReflectionClass($object); $ns = explode('\\', $reflection->getNamespaceName()); if (class_exists($ns[0] . '\Module')) { $reflection = new \ReflectionClass($ns[0] . '\Module'); return strtolower(basename(dir...
php
public function whichModule($object){ $reflection = new \ReflectionClass($object); $ns = explode('\\', $reflection->getNamespaceName()); if (class_exists($ns[0] . '\Module')) { $reflection = new \ReflectionClass($ns[0] . '\Module'); return strtolower(basename(dir...
[ "public", "function", "whichModule", "(", "$", "object", ")", "{", "$", "reflection", "=", "new", "\\", "ReflectionClass", "(", "$", "object", ")", ";", "$", "ns", "=", "explode", "(", "'\\\\'", ",", "$", "reflection", "->", "getNamespaceName", "(", ")",...
Detect the name of the module based on class @param object $object Setup instance @return string|null Module name
[ "Detect", "the", "name", "of", "the", "module", "based", "on", "class" ]
db1a0bfe1262d555eb11cd0d99625b9ee43d6744
https://github.com/valu-digital/valusetup/blob/db1a0bfe1262d555eb11cd0d99625b9ee43d6744/src/ValuSetup/Setup/SetupUtils.php#L353-L378
199,848
valu-digital/valusetup
src/ValuSetup/Setup/SetupUtils.php
SetupUtils.getModuleVersion
public function getModuleVersion($module) { $config = $this->getModuleDefinition($module); if (isset($config['version'])) { return $config['version']; } else { return SoftwareVersion::DEFAULT_UNRESOLVED_VERSION; } }
php
public function getModuleVersion($module) { $config = $this->getModuleDefinition($module); if (isset($config['version'])) { return $config['version']; } else { return SoftwareVersion::DEFAULT_UNRESOLVED_VERSION; } }
[ "public", "function", "getModuleVersion", "(", "$", "module", ")", "{", "$", "config", "=", "$", "this", "->", "getModuleDefinition", "(", "$", "module", ")", ";", "if", "(", "isset", "(", "$", "config", "[", "'version'", "]", ")", ")", "{", "return", ...
Get current version for module @param string pathule @return string|null
[ "Get", "current", "version", "for", "module" ]
db1a0bfe1262d555eb11cd0d99625b9ee43d6744
https://github.com/valu-digital/valusetup/blob/db1a0bfe1262d555eb11cd0d99625b9ee43d6744/src/ValuSetup/Setup/SetupUtils.php#L386-L395
199,849
valu-digital/valusetup
src/ValuSetup/Setup/SetupUtils.php
SetupUtils.getModuleDefinition
public function getModuleDefinition($module) { $module = strtolower($module); if (!array_key_exists($module, $this->definitions)) { $path = $this->locateModule($module); $config = array(); if($path){ $definition = $path . DIRECTO...
php
public function getModuleDefinition($module) { $module = strtolower($module); if (!array_key_exists($module, $this->definitions)) { $path = $this->locateModule($module); $config = array(); if($path){ $definition = $path . DIRECTO...
[ "public", "function", "getModuleDefinition", "(", "$", "module", ")", "{", "$", "module", "=", "strtolower", "(", "$", "module", ")", ";", "if", "(", "!", "array_key_exists", "(", "$", "module", ",", "$", "this", "->", "definitions", ")", ")", "{", "$"...
Get module definition as an array @param string $module @return array
[ "Get", "module", "definition", "as", "an", "array" ]
db1a0bfe1262d555eb11cd0d99625b9ee43d6744
https://github.com/valu-digital/valusetup/blob/db1a0bfe1262d555eb11cd0d99625b9ee43d6744/src/ValuSetup/Setup/SetupUtils.php#L403-L430
199,850
valu-digital/valusetup
src/ValuSetup/Setup/SetupUtils.php
SetupUtils.getModuleDeps
public function getModuleDeps($module) { $module = strtolower($module); if (!isset($this->deps[$module])) { $map = array(); $deps = array(); $modules = $this->findModules(); foreach ($modules as $name) { $config ...
php
public function getModuleDeps($module) { $module = strtolower($module); if (!isset($this->deps[$module])) { $map = array(); $deps = array(); $modules = $this->findModules(); foreach ($modules as $name) { $config ...
[ "public", "function", "getModuleDeps", "(", "$", "module", ")", "{", "$", "module", "=", "strtolower", "(", "$", "module", ")", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "deps", "[", "$", "module", "]", ")", ")", "{", "$", "map", "=",...
Retrieve list of module dependencies @param string $module @return array
[ "Retrieve", "list", "of", "module", "dependencies" ]
db1a0bfe1262d555eb11cd0d99625b9ee43d6744
https://github.com/valu-digital/valusetup/blob/db1a0bfe1262d555eb11cd0d99625b9ee43d6744/src/ValuSetup/Setup/SetupUtils.php#L438-L470
199,851
valu-digital/valusetup
src/ValuSetup/Setup/SetupUtils.php
SetupUtils.setConfig
public function setConfig($config) { if(is_string($config) && file_exists($config)){ $options = \Zend\Config\Factory::fromFile($config); $this->setOptions($options); } elseif(!is_array($config) && !($config instanceof \Traversable)){ throw new \Inval...
php
public function setConfig($config) { if(is_string($config) && file_exists($config)){ $options = \Zend\Config\Factory::fromFile($config); $this->setOptions($options); } elseif(!is_array($config) && !($config instanceof \Traversable)){ throw new \Inval...
[ "public", "function", "setConfig", "(", "$", "config", ")", "{", "if", "(", "is_string", "(", "$", "config", ")", "&&", "file_exists", "(", "$", "config", ")", ")", "{", "$", "options", "=", "\\", "Zend", "\\", "Config", "\\", "Factory", "::", "fromF...
Set service options @param array|Traversable|string $config @return Service
[ "Set", "service", "options" ]
db1a0bfe1262d555eb11cd0d99625b9ee43d6744
https://github.com/valu-digital/valusetup/blob/db1a0bfe1262d555eb11cd0d99625b9ee43d6744/src/ValuSetup/Setup/SetupUtils.php#L520-L532
199,852
Vectrex/vxPHP
src/Application/Application.php
Application.getInstance
public static function getInstance(Config $config = null) { if(is_null(self::$instance)) { if(is_null($config)) { throw new ApplicationException('No configuration object provided. Cannot instantiate application.'); } self::$instance = new Application($config); } return self::$instance; }
php
public static function getInstance(Config $config = null) { if(is_null(self::$instance)) { if(is_null($config)) { throw new ApplicationException('No configuration object provided. Cannot instantiate application.'); } self::$instance = new Application($config); } return self::$instance; }
[ "public", "static", "function", "getInstance", "(", "Config", "$", "config", "=", "null", ")", "{", "if", "(", "is_null", "(", "self", "::", "$", "instance", ")", ")", "{", "if", "(", "is_null", "(", "$", "config", ")", ")", "{", "throw", "new", "A...
Get Application instance. @param Config $config @return Application @throws ApplicationException
[ "Get", "Application", "instance", "." ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Application/Application.php#L232-L243
199,853
Vectrex/vxPHP
src/Application/Application.php
Application.registerPlugins
public function registerPlugins() { if($this->plugins) { foreach($this->plugins as $plugin) { $this->eventDispatcher->removeSubscriber($plugin); } } $this->plugins = array(); // initialize plugins (if configured) if($this->config->plugins) { foreach(array_keys($this->config->plugins) a...
php
public function registerPlugins() { if($this->plugins) { foreach($this->plugins as $plugin) { $this->eventDispatcher->removeSubscriber($plugin); } } $this->plugins = array(); // initialize plugins (if configured) if($this->config->plugins) { foreach(array_keys($this->config->plugins) a...
[ "public", "function", "registerPlugins", "(", ")", "{", "if", "(", "$", "this", "->", "plugins", ")", "{", "foreach", "(", "$", "this", "->", "plugins", "as", "$", "plugin", ")", "{", "$", "this", "->", "eventDispatcher", "->", "removeSubscriber", "(", ...
Unregister all previously registered plugins. read plugin configuration from Config and register all configured plugins @return Application @throws ApplicationException
[ "Unregister", "all", "previously", "registered", "plugins", "." ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Application/Application.php#L266-L288
199,854
Vectrex/vxPHP
src/Application/Application.php
Application.getDb
public function getDb() { if(empty($this->db)) { if(empty($this->config->db)) { try { return $this->getVxPDO(); } catch(ApplicationException $e) { return null; } } $config = $this->config->db; $this->db = DatabaseInterfaceFactory::create( isset($config->typ...
php
public function getDb() { if(empty($this->db)) { if(empty($this->config->db)) { try { return $this->getVxPDO(); } catch(ApplicationException $e) { return null; } } $config = $this->config->db; $this->db = DatabaseInterfaceFactory::create( isset($config->typ...
[ "public", "function", "getDb", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "db", ")", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "config", "->", "db", ")", ")", "{", "try", "{", "return", "$", "this", "->", "getVxPDO",...
get default vxPDO instance this method exists for backwards compatibility if no 'db' configuration is found, it tries to return a configured default vxpdo datasource @return \vxPHP\Database\DatabaseInterface @throws \Exception
[ "get", "default", "vxPDO", "instance" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Application/Application.php#L300-L331
199,855
Vectrex/vxPHP
src/Application/Application.php
Application.getVxPDO
public function getVxPDO($name = 'default') { if(!array_key_exists($name, $this->vxPDOInstances)) { if(empty($this->config->vxpdo) || !array_key_exists($name, $this->config->vxpdo)) { throw new ApplicationException(sprintf("vxPDO configuration for '%s' not found.", $name)); } $dsConfig = $this->c...
php
public function getVxPDO($name = 'default') { if(!array_key_exists($name, $this->vxPDOInstances)) { if(empty($this->config->vxpdo) || !array_key_exists($name, $this->config->vxpdo)) { throw new ApplicationException(sprintf("vxPDO configuration for '%s' not found.", $name)); } $dsConfig = $this->c...
[ "public", "function", "getVxPDO", "(", "$", "name", "=", "'default'", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "name", ",", "$", "this", "->", "vxPDOInstances", ")", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "config", "->",...
get a configured vxPDO instance identified by its datasource name @param string $name @throws ApplicationException @return \vxPHP\Database\DatabaseInterface
[ "get", "a", "configured", "vxPDO", "instance", "identified", "by", "its", "datasource", "name" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Application/Application.php#L342-L368
199,856
Vectrex/vxPHP
src/Application/Application.php
Application.getService
public function getService($serviceId) { $args = func_get_args(); $service = $this->initializeService($serviceId, array_splice($args, 1)); $this->services[] = $service; return $service; }
php
public function getService($serviceId) { $args = func_get_args(); $service = $this->initializeService($serviceId, array_splice($args, 1)); $this->services[] = $service; return $service; }
[ "public", "function", "getService", "(", "$", "serviceId", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "$", "service", "=", "$", "this", "->", "initializeService", "(", "$", "serviceId", ",", "array_splice", "(", "$", "args", ",", "1", ...
return a service instance service instances are lazily initialized upon first request any extra argument is passed on to the constructor method of the service @param string $serviceId @return ServiceInterface :ServiceInterface @throws ApplicationException
[ "return", "a", "service", "instance", "service", "instances", "are", "lazily", "initialized", "upon", "first", "request" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Application/Application.php#L391-L399
199,857
Vectrex/vxPHP
src/Application/Application.php
Application.hasService
public function hasService($serviceId) { return !empty($this->config->services) && array_key_exists($serviceId, $this->config->services); }
php
public function hasService($serviceId) { return !empty($this->config->services) && array_key_exists($serviceId, $this->config->services); }
[ "public", "function", "hasService", "(", "$", "serviceId", ")", "{", "return", "!", "empty", "(", "$", "this", "->", "config", "->", "services", ")", "&&", "array_key_exists", "(", "$", "serviceId", ",", "$", "this", "->", "config", "->", "services", ")"...
checks whether a service identified by service id is configured no further checks whether service can be invoked are conducted @param $serviceId @return bool
[ "checks", "whether", "a", "service", "identified", "by", "service", "id", "is", "configured", "no", "further", "checks", "whether", "service", "can", "be", "invoked", "are", "conducted" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Application/Application.php#L408-L412
199,858
Vectrex/vxPHP
src/Application/Application.php
Application.runsLocally
public function runsLocally() { if(is_null($this->isLocal)) { $remote = isset($_SERVER['HTTP_CLIENT_IP']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']) || !( in_array( @$_SERVER['REMOTE_ADDR'], [ '127.0.0.1', 'fe80::1', '::1' ] ) || PHP_S...
php
public function runsLocally() { if(is_null($this->isLocal)) { $remote = isset($_SERVER['HTTP_CLIENT_IP']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']) || !( in_array( @$_SERVER['REMOTE_ADDR'], [ '127.0.0.1', 'fe80::1', '::1' ] ) || PHP_S...
[ "public", "function", "runsLocally", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "isLocal", ")", ")", "{", "$", "remote", "=", "isset", "(", "$", "_SERVER", "[", "'HTTP_CLIENT_IP'", "]", ")", "||", "isset", "(", "$", "_SERVER", "[", ...
returns true when the application was called from the command line or in a localhost environment @return boolean
[ "returns", "true", "when", "the", "application", "was", "called", "from", "the", "command", "line", "or", "in", "a", "localhost", "environment" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Application/Application.php#L442-L469
199,859
Vectrex/vxPHP
src/Application/Application.php
Application.getSourcePath
public function getSourcePath() { // lazy init if(is_null($this->sourcePath)) { $this->sourcePath = $this->rootPath . 'src' . DIRECTORY_SEPARATOR; } return $this->sourcePath; }
php
public function getSourcePath() { // lazy init if(is_null($this->sourcePath)) { $this->sourcePath = $this->rootPath . 'src' . DIRECTORY_SEPARATOR; } return $this->sourcePath; }
[ "public", "function", "getSourcePath", "(", ")", "{", "// lazy init", "if", "(", "is_null", "(", "$", "this", "->", "sourcePath", ")", ")", "{", "$", "this", "->", "sourcePath", "=", "$", "this", "->", "rootPath", ".", "'src'", ".", "DIRECTORY_SEPARATOR", ...
get absolute path to application source @return string
[ "get", "absolute", "path", "to", "application", "source" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Application/Application.php#L476-L490
199,860
Vectrex/vxPHP
src/Application/Application.php
Application.setAbsoluteAssetsPath
public function setAbsoluteAssetsPath($path) { $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; if(!is_null($this->rootPath) && 0 !== strpos($path, $this->rootPath)) { throw new ApplicationException(sprintf("'%s' not within application path '%s'.", $path, $this->rootPath), ApplicationException:...
php
public function setAbsoluteAssetsPath($path) { $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; if(!is_null($this->rootPath) && 0 !== strpos($path, $this->rootPath)) { throw new ApplicationException(sprintf("'%s' not within application path '%s'.", $path, $this->rootPath), ApplicationException:...
[ "public", "function", "setAbsoluteAssetsPath", "(", "$", "path", ")", "{", "$", "path", "=", "rtrim", "(", "$", "path", ",", "DIRECTORY_SEPARATOR", ")", ".", "DIRECTORY_SEPARATOR", ";", "if", "(", "!", "is_null", "(", "$", "this", "->", "rootPath", ")", ...
set absolute assets path the relative assets path is updated @param string $path @return Application @throws ApplicationException
[ "set", "absolute", "assets", "path", "the", "relative", "assets", "path", "is", "updated" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Application/Application.php#L500-L512
199,861
Vectrex/vxPHP
src/Application/Application.php
Application.setRootPath
public function setRootPath($path) { $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; if(!is_null($this->absoluteAssetsPath) && 0 !== strpos($this->absoluteAssetsPath, $path)) { throw new ApplicationException("'$path' not a parent of assets path '{$this->absoluteAssetsPath}'", ApplicationExcept...
php
public function setRootPath($path) { $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; if(!is_null($this->absoluteAssetsPath) && 0 !== strpos($this->absoluteAssetsPath, $path)) { throw new ApplicationException("'$path' not a parent of assets path '{$this->absoluteAssetsPath}'", ApplicationExcept...
[ "public", "function", "setRootPath", "(", "$", "path", ")", "{", "$", "path", "=", "rtrim", "(", "$", "path", ",", "DIRECTORY_SEPARATOR", ")", ".", "DIRECTORY_SEPARATOR", ";", "if", "(", "!", "is_null", "(", "$", "this", "->", "absoluteAssetsPath", ")", ...
set root path of application if an assetspath is set, the relative assets path is updated @param string $path @return Application @throws ApplicationException
[ "set", "root", "path", "of", "application", "if", "an", "assetspath", "is", "set", "the", "relative", "assets", "path", "is", "updated" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Application/Application.php#L578-L591
199,862
Vectrex/vxPHP
src/Application/Application.php
Application.getAvailableLocales
public function getAvailableLocales() { foreach($this->locales as $id => $l) { if(!$l) { $this->locales[$id] = new Locale($id); } } return $this->locales; }
php
public function getAvailableLocales() { foreach($this->locales as $id => $l) { if(!$l) { $this->locales[$id] = new Locale($id); } } return $this->locales; }
[ "public", "function", "getAvailableLocales", "(", ")", "{", "foreach", "(", "$", "this", "->", "locales", "as", "$", "id", "=>", "$", "l", ")", "{", "if", "(", "!", "$", "l", ")", "{", "$", "this", "->", "locales", "[", "$", "id", "]", "=", "ne...
returns an array with available Locale instances because of lazy instantiation, missing instances are created now @return array
[ "returns", "an", "array", "with", "available", "Locale", "instances", "because", "of", "lazy", "instantiation", "missing", "instances", "are", "created", "now" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Application/Application.php#L689-L698
199,863
Vectrex/vxPHP
src/Application/Application.php
Application.initializeService
private function initializeService($serviceId, array $constructorArguments) { if(!isset($this->config->services[$serviceId])) { throw new ApplicationException(sprintf("Service '%s' not configured.", $serviceId)); } $configData = $this->config->services[$serviceId]; // get class name $class = $configD...
php
private function initializeService($serviceId, array $constructorArguments) { if(!isset($this->config->services[$serviceId])) { throw new ApplicationException(sprintf("Service '%s' not configured.", $serviceId)); } $configData = $this->config->services[$serviceId]; // get class name $class = $configD...
[ "private", "function", "initializeService", "(", "$", "serviceId", ",", "array", "$", "constructorArguments", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "config", "->", "services", "[", "$", "serviceId", "]", ")", ")", "{", "throw", "new"...
create and initialize a service instance @param string $serviceId @param array $constructorArguments @throws ApplicationException @return ServiceInterface
[ "create", "and", "initialize", "a", "service", "instance" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Application/Application.php#L802-L835
199,864
Vectrex/vxPHP
src/Application/Application.php
Application.initializePlugin
private function initializePlugin($pluginId) { $configData = $this->config->plugins[$pluginId]; // load class file $class = str_replace('/', '\\', $configData['class']); $file = $this->rootPath . 'src/' . $configData['classPath'] . $class . '.php'; if(!file_exists($file)) { throw new ApplicationExce...
php
private function initializePlugin($pluginId) { $configData = $this->config->plugins[$pluginId]; // load class file $class = str_replace('/', '\\', $configData['class']); $file = $this->rootPath . 'src/' . $configData['classPath'] . $class . '.php'; if(!file_exists($file)) { throw new ApplicationExce...
[ "private", "function", "initializePlugin", "(", "$", "pluginId", ")", "{", "$", "configData", "=", "$", "this", "->", "config", "->", "plugins", "[", "$", "pluginId", "]", ";", "// load class file", "$", "class", "=", "str_replace", "(", "'/'", ",", "'\\\\...
create, initialize and register a plugin instance @param string $pluginId @throws ApplicationException @return SubscriberInterface
[ "create", "initialize", "and", "register", "a", "plugin", "instance" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Application/Application.php#L844-L887
199,865
dmj/PicaRecord
src/HAB/Pica/Record/TitleRecord.php
TitleRecord.setFields
public function setFields (array $fields) { $this->_fields = array(); $this->_records = array(); $prevLevel = null; foreach ($fields as $field) { $level = $field->getLevel(); if ($level === 0) { $this->append($field); } else { ...
php
public function setFields (array $fields) { $this->_fields = array(); $this->_records = array(); $prevLevel = null; foreach ($fields as $field) { $level = $field->getLevel(); if ($level === 0) { $this->append($field); } else { ...
[ "public", "function", "setFields", "(", "array", "$", "fields", ")", "{", "$", "this", "->", "_fields", "=", "array", "(", ")", ";", "$", "this", "->", "_records", "=", "array", "(", ")", ";", "$", "prevLevel", "=", "null", ";", "foreach", "(", "$"...
Set the record's fields. @todo Relocate to \HAB\Pica\Record\Record::factory(), maybe @param array $fields Field @return void
[ "Set", "the", "record", "s", "fields", "." ]
bd5577b9a4333aa6156398b94cc870a9377061b8
https://github.com/dmj/PicaRecord/blob/bd5577b9a4333aa6156398b94cc870a9377061b8/src/HAB/Pica/Record/TitleRecord.php#L63-L99
199,866
dmj/PicaRecord
src/HAB/Pica/Record/TitleRecord.php
TitleRecord.getLocalRecordByILN
public function getLocalRecordByILN ($iln) { foreach ($this->getLocalRecords() as $localRecord) { if ($localRecord->getILN() == $iln) { return $localRecord; } } return null; }
php
public function getLocalRecordByILN ($iln) { foreach ($this->getLocalRecords() as $localRecord) { if ($localRecord->getILN() == $iln) { return $localRecord; } } return null; }
[ "public", "function", "getLocalRecordByILN", "(", "$", "iln", ")", "{", "foreach", "(", "$", "this", "->", "getLocalRecords", "(", ")", "as", "$", "localRecord", ")", "{", "if", "(", "$", "localRecord", "->", "getILN", "(", ")", "==", "$", "iln", ")", ...
Return a local record identified by its ILN. @param integer $iln Intenal library number @return LocalRecord|null
[ "Return", "a", "local", "record", "identified", "by", "its", "ILN", "." ]
bd5577b9a4333aa6156398b94cc870a9377061b8
https://github.com/dmj/PicaRecord/blob/bd5577b9a4333aa6156398b94cc870a9377061b8/src/HAB/Pica/Record/TitleRecord.php#L143-L151
199,867
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/PostRepository.php
PostRepository.getAllPublishablePosts
public function getAllPublishablePosts() { $collection = $this->getAll()->sortByDesc('updated_at'); $filtered = $collection->filter(function ($item) { if ($item->enabled == 1) return true; }); $filtered = $filtered->filter(function ($item) { $todaysDate = Da...
php
public function getAllPublishablePosts() { $collection = $this->getAll()->sortByDesc('updated_at'); $filtered = $collection->filter(function ($item) { if ($item->enabled == 1) return true; }); $filtered = $filtered->filter(function ($item) { $todaysDate = Da...
[ "public", "function", "getAllPublishablePosts", "(", ")", "{", "$", "collection", "=", "$", "this", "->", "getAll", "(", ")", "->", "sortByDesc", "(", "'updated_at'", ")", ";", "$", "filtered", "=", "$", "collection", "->", "filter", "(", "function", "(", ...
Get all the posts ENABLED, PUBLISH_ON <= TODAY, DESC @return collection
[ "Get", "all", "the", "posts" ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/PostRepository.php#L74-L91
199,868
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/PostRepository.php
PostRepository.getCategoryTitleById
public function getCategoryTitleById($categoryId) { $category = DB::table('categories') ->where('id', '=', $categoryId) ->first() ; return $category->title; }
php
public function getCategoryTitleById($categoryId) { $category = DB::table('categories') ->where('id', '=', $categoryId) ->first() ; return $category->title; }
[ "public", "function", "getCategoryTitleById", "(", "$", "categoryId", ")", "{", "$", "category", "=", "DB", "::", "table", "(", "'categories'", ")", "->", "where", "(", "'id'", ",", "'='", ",", "$", "categoryId", ")", "->", "first", "(", ")", ";", "ret...
Find the category title by the category's id I have this little function here because I do not want to inject the category's repository. The purpose of having the category's title is to build a URL to all posts with that category. @param int $categoryId The category's ID @return string
[ "Find", "the", "category", "title", "by", "the", "category", "s", "id" ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/PostRepository.php#L191-L199
199,869
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/PostRepository.php
PostRepository.getTagTitlesByPostId
public function getTagTitlesByPostId($postId) { // Grab the tag ID's from the post_tag table $post_tags = DB::table('post_tag') ->where('post_id', '=', $postId) ->get() ; // if there are no tags associated with this post, then return emptiness if (emp...
php
public function getTagTitlesByPostId($postId) { // Grab the tag ID's from the post_tag table $post_tags = DB::table('post_tag') ->where('post_id', '=', $postId) ->get() ; // if there are no tags associated with this post, then return emptiness if (emp...
[ "public", "function", "getTagTitlesByPostId", "(", "$", "postId", ")", "{", "// Grab the tag ID's from the post_tag table", "$", "post_tags", "=", "DB", "::", "table", "(", "'post_tag'", ")", "->", "where", "(", "'post_id'", ",", "'='", ",", "$", "postId", ")", ...
Find the tag's titles for those tags that are associated with a post. I have this little function here because I do not want to inject the tag's repository. @param int $postId The post's ID @return array
[ "Find", "the", "tag", "s", "titles", "for", "those", "tags", "that", "are", "associated", "with", "a", "post", "." ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/PostRepository.php#L210-L241
199,870
Kris-Kuiper/sFire-Framework
src/HTTP/Response.php
Response.addHeader
public static function addHeader($type, $value, $code = null) { if(false == is_string($type)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($type)), E_USER_ERROR); } if(false == is_string($value) && false == is_numeric($value)) { ...
php
public static function addHeader($type, $value, $code = null) { if(false == is_string($type)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($type)), E_USER_ERROR); } if(false == is_string($value) && false == is_numeric($value)) { ...
[ "public", "static", "function", "addHeader", "(", "$", "type", ",", "$", "value", ",", "$", "code", "=", "null", ")", "{", "if", "(", "false", "==", "is_string", "(", "$", "type", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argum...
Sets the response header by type and value @param string $type @param string $value
[ "Sets", "the", "response", "header", "by", "type", "and", "value" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/HTTP/Response.php#L21-L40
199,871
Kris-Kuiper/sFire-Framework
src/HTTP/Response.php
Response.removeHeader
public static function removeHeader($type) { if(false == is_string($type)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($type)), E_USER_ERROR); } header_remove($type); }
php
public static function removeHeader($type) { if(false == is_string($type)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($type)), E_USER_ERROR); } header_remove($type); }
[ "public", "static", "function", "removeHeader", "(", "$", "type", ")", "{", "if", "(", "false", "==", "is_string", "(", "$", "type", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() must be of the type string, \"%s\" given'"...
Remove response header by type @param string $type
[ "Remove", "response", "header", "by", "type" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/HTTP/Response.php#L47-L54
199,872
Kris-Kuiper/sFire-Framework
src/HTTP/Response.php
Response.file
public static function file(File $file, $filename = null, $mime = null) { if(null !== $filename && false === is_string($filename)) { return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($filename)), E_USER_ERROR); } if(null !== $mime && fa...
php
public static function file(File $file, $filename = null, $mime = null) { if(null !== $filename && false === is_string($filename)) { return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($filename)), E_USER_ERROR); } if(null !== $mime && fa...
[ "public", "static", "function", "file", "(", "File", "$", "file", ",", "$", "filename", "=", "null", ",", "$", "mime", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "filename", "&&", "false", "===", "is_string", "(", "$", "filename", ")", "...
Give a file for the client to download @param sFire\System\File $file @param string $name @param string $mime
[ "Give", "a", "file", "for", "the", "client", "to", "download" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/HTTP/Response.php#L71-L114
199,873
prolic/HumusMvc
src/HumusMvc/View/Helper/Navigation.php
Navigation.setPluginManager
public function setPluginManager(Navigation\PluginManager $plugins) { if ($this->view) { $plugins->setView($this->view); } $this->plugins = $plugins; return $this; }
php
public function setPluginManager(Navigation\PluginManager $plugins) { if ($this->view) { $plugins->setView($this->view); } $this->plugins = $plugins; return $this; }
[ "public", "function", "setPluginManager", "(", "Navigation", "\\", "PluginManager", "$", "plugins", ")", "{", "if", "(", "$", "this", "->", "view", ")", "{", "$", "plugins", "->", "setView", "(", "$", "this", "->", "view", ")", ";", "}", "$", "this", ...
Set manager for retrieving navigation helpers @param Navigation\PluginManager $plugins @return Navigation
[ "Set", "manager", "for", "retrieving", "navigation", "helpers" ]
09e8c6422d84b57745cc643047e10761be2a21a7
https://github.com/prolic/HumusMvc/blob/09e8c6422d84b57745cc643047e10761be2a21a7/src/HumusMvc/View/Helper/Navigation.php#L50-L57
199,874
prolic/HumusMvc
src/HumusMvc/View/Helper/Navigation.php
Navigation.getPluginManager
public function getPluginManager() { if (null === $this->plugins) { $this->setPluginManager(new Navigation\PluginManager()); } return $this->plugins; }
php
public function getPluginManager() { if (null === $this->plugins) { $this->setPluginManager(new Navigation\PluginManager()); } return $this->plugins; }
[ "public", "function", "getPluginManager", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "plugins", ")", "{", "$", "this", "->", "setPluginManager", "(", "new", "Navigation", "\\", "PluginManager", "(", ")", ")", ";", "}", "return", "$", "...
Retrieve plugin loader for navigation helpers Lazy-loads an instance of Navigation\HelperLoader if none currently registered. @return Navigation\PluginManager
[ "Retrieve", "plugin", "loader", "for", "navigation", "helpers" ]
09e8c6422d84b57745cc643047e10761be2a21a7
https://github.com/prolic/HumusMvc/blob/09e8c6422d84b57745cc643047e10761be2a21a7/src/HumusMvc/View/Helper/Navigation.php#L67-L73
199,875
wasinger/adaptimage
src/ImageFileInfo.php
ImageFileInfo.createFromFile
static public function createFromFile($pathname) { if (!file_exists($pathname)) { throw new ImageFileNotFoundException($pathname); } $ii = getimagesize($pathname); $width = $ii[0]; $height = $ii[1]; $imagetype = $ii[2]; $last_modified = fi...
php
static public function createFromFile($pathname) { if (!file_exists($pathname)) { throw new ImageFileNotFoundException($pathname); } $ii = getimagesize($pathname); $width = $ii[0]; $height = $ii[1]; $imagetype = $ii[2]; $last_modified = fi...
[ "static", "public", "function", "createFromFile", "(", "$", "pathname", ")", "{", "if", "(", "!", "file_exists", "(", "$", "pathname", ")", ")", "{", "throw", "new", "ImageFileNotFoundException", "(", "$", "pathname", ")", ";", "}", "$", "ii", "=", "geti...
Create an ImageFileInfo from an image file @param string $pathname The pathname of an image file. @return ImageFileInfo @throws ImageFileNotFoundException If the image does not exist
[ "Create", "an", "ImageFileInfo", "from", "an", "image", "file" ]
7b529b25081b399451c8bbd56d0cef7daaa83ec4
https://github.com/wasinger/adaptimage/blob/7b529b25081b399451c8bbd56d0cef7daaa83ec4/src/ImageFileInfo.php#L79-L96
199,876
dmitrya2e/filtration-bundle
Filter/Filter/AbstractRangeOrSingleFilter.php
AbstractRangeOrSingleFilter.setSingleType
public function setSingleType($singleType) { $allowedTypes = [ self::SINGLE_TYPE_EXACT, self::SINGLE_TYPE_GREATER, self::SINGLE_TYPE_GREATER_OR_EQUAL, self::SINGLE_TYPE_LESS, self::SINGLE_TYPE_LESS_OR_EQUAL, ]; if (!is_string($sing...
php
public function setSingleType($singleType) { $allowedTypes = [ self::SINGLE_TYPE_EXACT, self::SINGLE_TYPE_GREATER, self::SINGLE_TYPE_GREATER_OR_EQUAL, self::SINGLE_TYPE_LESS, self::SINGLE_TYPE_LESS_OR_EQUAL, ]; if (!is_string($sing...
[ "public", "function", "setSingleType", "(", "$", "singleType", ")", "{", "$", "allowedTypes", "=", "[", "self", "::", "SINGLE_TYPE_EXACT", ",", "self", "::", "SINGLE_TYPE_GREATER", ",", "self", "::", "SINGLE_TYPE_GREATER_OR_EQUAL", ",", "self", "::", "SINGLE_TYPE_...
Sets type for the filter treated as single. @param string $singleType AbstractRangeOrSingleFilter::SINGLE_TYPE_* @return static @throws InvalidArgumentException On invalid argument
[ "Sets", "type", "for", "the", "filter", "treated", "as", "single", "." ]
fed5764af4e43871835744fb84957b2a76e9a215
https://github.com/dmitrya2e/filtration-bundle/blob/fed5764af4e43871835744fb84957b2a76e9a215/Filter/Filter/AbstractRangeOrSingleFilter.php#L455-L474
199,877
dmitrya2e/filtration-bundle
Filter/Filter/AbstractRangeOrSingleFilter.php
AbstractRangeOrSingleFilter.setFromValuePropertyName
public function setFromValuePropertyName($fromValuePropertyName) { if (!is_string($fromValuePropertyName) || empty($fromValuePropertyName)) { throw new InvalidArgumentException('"From value property name" argument must be string and must not be empty.'); } if (!property_exists($...
php
public function setFromValuePropertyName($fromValuePropertyName) { if (!is_string($fromValuePropertyName) || empty($fromValuePropertyName)) { throw new InvalidArgumentException('"From value property name" argument must be string and must not be empty.'); } if (!property_exists($...
[ "public", "function", "setFromValuePropertyName", "(", "$", "fromValuePropertyName", ")", "{", "if", "(", "!", "is_string", "(", "$", "fromValuePropertyName", ")", "||", "empty", "(", "$", "fromValuePropertyName", ")", ")", "{", "throw", "new", "InvalidArgumentExc...
Sets "from" value property name, which contains the "from" value. @param string $fromValuePropertyName @return static @throws InvalidArgumentException On invalid argument
[ "Sets", "from", "value", "property", "name", "which", "contains", "the", "from", "value", "." ]
fed5764af4e43871835744fb84957b2a76e9a215
https://github.com/dmitrya2e/filtration-bundle/blob/fed5764af4e43871835744fb84957b2a76e9a215/Filter/Filter/AbstractRangeOrSingleFilter.php#L494-L507
199,878
dmitrya2e/filtration-bundle
Filter/Filter/AbstractRangeOrSingleFilter.php
AbstractRangeOrSingleFilter.setToValuePropertyName
public function setToValuePropertyName($toValuePropertyName) { if (!is_string($toValuePropertyName) || empty($toValuePropertyName)) { throw new InvalidArgumentException('"To value property name" argument must be string and must not be empty.'); } if (!property_exists($this, $toV...
php
public function setToValuePropertyName($toValuePropertyName) { if (!is_string($toValuePropertyName) || empty($toValuePropertyName)) { throw new InvalidArgumentException('"To value property name" argument must be string and must not be empty.'); } if (!property_exists($this, $toV...
[ "public", "function", "setToValuePropertyName", "(", "$", "toValuePropertyName", ")", "{", "if", "(", "!", "is_string", "(", "$", "toValuePropertyName", ")", "||", "empty", "(", "$", "toValuePropertyName", ")", ")", "{", "throw", "new", "InvalidArgumentException",...
Sets "to" value property name, which contains the "to" value. @param string $toValuePropertyName @return static @throws InvalidArgumentException On invalid argument
[ "Sets", "to", "value", "property", "name", "which", "contains", "the", "to", "value", "." ]
fed5764af4e43871835744fb84957b2a76e9a215
https://github.com/dmitrya2e/filtration-bundle/blob/fed5764af4e43871835744fb84957b2a76e9a215/Filter/Filter/AbstractRangeOrSingleFilter.php#L527-L540
199,879
dmitrya2e/filtration-bundle
Filter/Filter/AbstractRangeOrSingleFilter.php
AbstractRangeOrSingleFilter.setFromPostfix
public function setFromPostfix($fromPostfix) { if (!is_string($fromPostfix) || empty($fromPostfix)) { throw new InvalidArgumentException('"From postfix" argument must be string and must not be empty.'); } $this->fromPostfix = $fromPostfix; return $this; }
php
public function setFromPostfix($fromPostfix) { if (!is_string($fromPostfix) || empty($fromPostfix)) { throw new InvalidArgumentException('"From postfix" argument must be string and must not be empty.'); } $this->fromPostfix = $fromPostfix; return $this; }
[ "public", "function", "setFromPostfix", "(", "$", "fromPostfix", ")", "{", "if", "(", "!", "is_string", "(", "$", "fromPostfix", ")", "||", "empty", "(", "$", "fromPostfix", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'\"From postfix\" arg...
Sets "from" name postfix. @param string $fromPostfix @return static @throws InvalidArgumentException On invalid argument
[ "Sets", "from", "name", "postfix", "." ]
fed5764af4e43871835744fb84957b2a76e9a215
https://github.com/dmitrya2e/filtration-bundle/blob/fed5764af4e43871835744fb84957b2a76e9a215/Filter/Filter/AbstractRangeOrSingleFilter.php#L560-L569
199,880
dmitrya2e/filtration-bundle
Filter/Filter/AbstractRangeOrSingleFilter.php
AbstractRangeOrSingleFilter.setToPostfix
public function setToPostfix($toPostfix) { if (!is_string($toPostfix) || empty($toPostfix)) { throw new InvalidArgumentException('"To postfix" argument must be string and must not be empty.'); } $this->toPostfix = $toPostfix; return $this; }
php
public function setToPostfix($toPostfix) { if (!is_string($toPostfix) || empty($toPostfix)) { throw new InvalidArgumentException('"To postfix" argument must be string and must not be empty.'); } $this->toPostfix = $toPostfix; return $this; }
[ "public", "function", "setToPostfix", "(", "$", "toPostfix", ")", "{", "if", "(", "!", "is_string", "(", "$", "toPostfix", ")", "||", "empty", "(", "$", "toPostfix", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'\"To postfix\" argument must...
Sets "to" name postfix. @param string $toPostfix @return static @throws InvalidArgumentException On invalid argument
[ "Sets", "to", "name", "postfix", "." ]
fed5764af4e43871835744fb84957b2a76e9a215
https://github.com/dmitrya2e/filtration-bundle/blob/fed5764af4e43871835744fb84957b2a76e9a215/Filter/Filter/AbstractRangeOrSingleFilter.php#L589-L598
199,881
dmitrya2e/filtration-bundle
Filter/Filter/AbstractRangeOrSingleFilter.php
AbstractRangeOrSingleFilter.setRangedFromType
public function setRangedFromType($rangedFromType) { $allowedTypes = [self::RANGED_FROM_TYPE_GREATER, self::RANGED_FROM_TYPE_GREATER_OR_EQUAL]; if (!is_string($rangedFromType) || !in_array($rangedFromType, $allowedTypes, true)) { throw new InvalidArgumentException(sprintf( ...
php
public function setRangedFromType($rangedFromType) { $allowedTypes = [self::RANGED_FROM_TYPE_GREATER, self::RANGED_FROM_TYPE_GREATER_OR_EQUAL]; if (!is_string($rangedFromType) || !in_array($rangedFromType, $allowedTypes, true)) { throw new InvalidArgumentException(sprintf( ...
[ "public", "function", "setRangedFromType", "(", "$", "rangedFromType", ")", "{", "$", "allowedTypes", "=", "[", "self", "::", "RANGED_FROM_TYPE_GREATER", ",", "self", "::", "RANGED_FROM_TYPE_GREATER_OR_EQUAL", "]", ";", "if", "(", "!", "is_string", "(", "$", "ra...
Sets "from" type for the filter treated as ranged. @param string $rangedFromType AbstractRangeOrSingleFilter::RANGED_FROM_TYPE_* @return static @throws InvalidArgumentException On invalid argument
[ "Sets", "from", "type", "for", "the", "filter", "treated", "as", "ranged", "." ]
fed5764af4e43871835744fb84957b2a76e9a215
https://github.com/dmitrya2e/filtration-bundle/blob/fed5764af4e43871835744fb84957b2a76e9a215/Filter/Filter/AbstractRangeOrSingleFilter.php#L628-L641
199,882
dmitrya2e/filtration-bundle
Filter/Filter/AbstractRangeOrSingleFilter.php
AbstractRangeOrSingleFilter.setRangedToType
public function setRangedToType($rangedToType) { $allowedTypes = [self::RANGED_TO_TYPE_LESS, self::RANGED_TO_TYPE_LESS_OR_EQUAL]; if (!is_string($rangedToType) || !in_array($rangedToType, $allowedTypes)) { throw new InvalidArgumentException(sprintf( 'Invalid "ranged to t...
php
public function setRangedToType($rangedToType) { $allowedTypes = [self::RANGED_TO_TYPE_LESS, self::RANGED_TO_TYPE_LESS_OR_EQUAL]; if (!is_string($rangedToType) || !in_array($rangedToType, $allowedTypes)) { throw new InvalidArgumentException(sprintf( 'Invalid "ranged to t...
[ "public", "function", "setRangedToType", "(", "$", "rangedToType", ")", "{", "$", "allowedTypes", "=", "[", "self", "::", "RANGED_TO_TYPE_LESS", ",", "self", "::", "RANGED_TO_TYPE_LESS_OR_EQUAL", "]", ";", "if", "(", "!", "is_string", "(", "$", "rangedToType", ...
Sets "to" type for the filter treated as ranged. @param string $rangedToType AbstractRangeOrSingleFilter::RANGED_TO_TYPE_* @return static @throws InvalidArgumentException On invalid argument
[ "Sets", "to", "type", "for", "the", "filter", "treated", "as", "ranged", "." ]
fed5764af4e43871835744fb84957b2a76e9a215
https://github.com/dmitrya2e/filtration-bundle/blob/fed5764af4e43871835744fb84957b2a76e9a215/Filter/Filter/AbstractRangeOrSingleFilter.php#L661-L674
199,883
dmitrya2e/filtration-bundle
Filter/Filter/AbstractRangeOrSingleFilter.php
AbstractRangeOrSingleFilter.setFormFieldTypeRangedFrom
public function setFormFieldTypeRangedFrom($formFieldTypeRangedFrom) { if (!is_string($formFieldTypeRangedFrom) || empty($formFieldTypeRangedFrom)) { throw new InvalidArgumentException('"Form field type ranged from" argument must be string and must not be empty.'); } $this->form...
php
public function setFormFieldTypeRangedFrom($formFieldTypeRangedFrom) { if (!is_string($formFieldTypeRangedFrom) || empty($formFieldTypeRangedFrom)) { throw new InvalidArgumentException('"Form field type ranged from" argument must be string and must not be empty.'); } $this->form...
[ "public", "function", "setFormFieldTypeRangedFrom", "(", "$", "formFieldTypeRangedFrom", ")", "{", "if", "(", "!", "is_string", "(", "$", "formFieldTypeRangedFrom", ")", "||", "empty", "(", "$", "formFieldTypeRangedFrom", ")", ")", "{", "throw", "new", "InvalidArg...
Sets form field type for "from" field. @param string $formFieldTypeRangedFrom @return static @throws InvalidArgumentException On invalid argument
[ "Sets", "form", "field", "type", "for", "from", "field", "." ]
fed5764af4e43871835744fb84957b2a76e9a215
https://github.com/dmitrya2e/filtration-bundle/blob/fed5764af4e43871835744fb84957b2a76e9a215/Filter/Filter/AbstractRangeOrSingleFilter.php#L694-L703
199,884
dmitrya2e/filtration-bundle
Filter/Filter/AbstractRangeOrSingleFilter.php
AbstractRangeOrSingleFilter.setFormFieldTypeRangedTo
public function setFormFieldTypeRangedTo($formFieldTypeRangedTo) { if (!is_string($formFieldTypeRangedTo) || empty($formFieldTypeRangedTo)) { throw new InvalidArgumentException('"Form field type ranged to" argument must be string and must not be empty.'); } $this->formFieldTypeR...
php
public function setFormFieldTypeRangedTo($formFieldTypeRangedTo) { if (!is_string($formFieldTypeRangedTo) || empty($formFieldTypeRangedTo)) { throw new InvalidArgumentException('"Form field type ranged to" argument must be string and must not be empty.'); } $this->formFieldTypeR...
[ "public", "function", "setFormFieldTypeRangedTo", "(", "$", "formFieldTypeRangedTo", ")", "{", "if", "(", "!", "is_string", "(", "$", "formFieldTypeRangedTo", ")", "||", "empty", "(", "$", "formFieldTypeRangedTo", ")", ")", "{", "throw", "new", "InvalidArgumentExc...
Sets form field type for "to" field. @param string $formFieldTypeRangedTo @return static @throws InvalidArgumentException On invalid argument
[ "Sets", "form", "field", "type", "for", "to", "field", "." ]
fed5764af4e43871835744fb84957b2a76e9a215
https://github.com/dmitrya2e/filtration-bundle/blob/fed5764af4e43871835744fb84957b2a76e9a215/Filter/Filter/AbstractRangeOrSingleFilter.php#L723-L732
199,885
t3v/t3v_core
Classes/Utility/IconUtility.php
IconUtility.iconIdentifier
public static function iconIdentifier(string $iconKey, string $separator = '_'): string { $slugify = new Slugify(['separator' => $separator]); $iconIdentifier = $slugify->slugify($iconKey); return $iconIdentifier; }
php
public static function iconIdentifier(string $iconKey, string $separator = '_'): string { $slugify = new Slugify(['separator' => $separator]); $iconIdentifier = $slugify->slugify($iconKey); return $iconIdentifier; }
[ "public", "static", "function", "iconIdentifier", "(", "string", "$", "iconKey", ",", "string", "$", "separator", "=", "'_'", ")", ":", "string", "{", "$", "slugify", "=", "new", "Slugify", "(", "[", "'separator'", "=>", "$", "separator", "]", ")", ";", ...
Gets an icon identifier from an icon key. @param string $iconKey The icon key @param string $separator The optional separator, defaults to `_` @return string The icon identifier
[ "Gets", "an", "icon", "identifier", "from", "an", "icon", "key", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/IconUtility.php#L19-L24
199,886
t3v/t3v_core
Classes/Utility/IconUtility.php
IconUtility.getIconIdentifier
public static function getIconIdentifier(string $iconKey, string $separator = '_'): string { return self::iconIdentifier($iconKey, $separator); }
php
public static function getIconIdentifier(string $iconKey, string $separator = '_'): string { return self::iconIdentifier($iconKey, $separator); }
[ "public", "static", "function", "getIconIdentifier", "(", "string", "$", "iconKey", ",", "string", "$", "separator", "=", "'_'", ")", ":", "string", "{", "return", "self", "::", "iconIdentifier", "(", "$", "iconKey", ",", "$", "separator", ")", ";", "}" ]
Alias for the `iconIdentifier` function. @param string $iconKey The icon key @param string $separator The optional separator, defaults to `_` @return string The icon identifier
[ "Alias", "for", "the", "iconIdentifier", "function", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/IconUtility.php#L33-L35
199,887
t3v/t3v_core
Classes/Utility/IconUtility.php
IconUtility.iconSignature
public static function iconSignature(string $extensionKey, string $iconIdentifier, string $separator = '-'): string { $iconSignature = mb_strtolower("${extensionKey}${separator}${iconIdentifier}"); return $iconSignature; }
php
public static function iconSignature(string $extensionKey, string $iconIdentifier, string $separator = '-'): string { $iconSignature = mb_strtolower("${extensionKey}${separator}${iconIdentifier}"); return $iconSignature; }
[ "public", "static", "function", "iconSignature", "(", "string", "$", "extensionKey", ",", "string", "$", "iconIdentifier", ",", "string", "$", "separator", "=", "'-'", ")", ":", "string", "{", "$", "iconSignature", "=", "mb_strtolower", "(", "\"${extensionKey}${...
Gets an icon signature from an extension key and icon identifier. @param string $extensionKey The extension key @param string $iconIdentifier The icon identifier @param string $separator The optional separator, defaults to `-` @return string The icon signature
[ "Gets", "an", "icon", "signature", "from", "an", "extension", "key", "and", "icon", "identifier", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/IconUtility.php#L45-L49
199,888
t3v/t3v_core
Classes/Utility/IconUtility.php
IconUtility.getIconSignature
public static function getIconSignature(string $extensionKey, string $iconIdentifier, string $separator = '-'): string { return self::iconSignature($extensionKey, $iconIdentifier, $separator); }
php
public static function getIconSignature(string $extensionKey, string $iconIdentifier, string $separator = '-'): string { return self::iconSignature($extensionKey, $iconIdentifier, $separator); }
[ "public", "static", "function", "getIconSignature", "(", "string", "$", "extensionKey", ",", "string", "$", "iconIdentifier", ",", "string", "$", "separator", "=", "'-'", ")", ":", "string", "{", "return", "self", "::", "iconSignature", "(", "$", "extensionKey...
Alias for the `iconSignature` function. @param string $extensionKey The extension key @param string $iconIdentifier The icon identifier @param string $separator The optional separator, defaults to `-` @return string The icon signature
[ "Alias", "for", "the", "iconSignature", "function", "." ]
8c04b7688cc2773f11fcc87fda3f7cd53d80a980
https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/IconUtility.php#L59-L61
199,889
DreadLabs/VantomasWebsite
src/SecretSanta/Donee/Resolver.php
Resolver.resolveFor
public function resolveFor(UserIdInterface $donorId) { $donor = $this->donorRepository->findOneById($donorId); $donee = $this->getResolverHandlerChain()->resolve($donor); $this->eventContext->dispatch(FoundDonee::fromPair($donor, $donee)); return $donee; }
php
public function resolveFor(UserIdInterface $donorId) { $donor = $this->donorRepository->findOneById($donorId); $donee = $this->getResolverHandlerChain()->resolve($donor); $this->eventContext->dispatch(FoundDonee::fromPair($donor, $donee)); return $donee; }
[ "public", "function", "resolveFor", "(", "UserIdInterface", "$", "donorId", ")", "{", "$", "donor", "=", "$", "this", "->", "donorRepository", "->", "findOneById", "(", "$", "donorId", ")", ";", "$", "donee", "=", "$", "this", "->", "getResolverHandlerChain"...
Resolves a donee for the incoming donor user id @param UserIdInterface $donorId User id of the donor @return DoneeInterface A donee
[ "Resolves", "a", "donee", "for", "the", "incoming", "donor", "user", "id" ]
7f85f2b45bdf5ed9fa9d320c805c416bf99cd668
https://github.com/DreadLabs/VantomasWebsite/blob/7f85f2b45bdf5ed9fa9d320c805c416bf99cd668/src/SecretSanta/Donee/Resolver.php#L77-L86
199,890
DreadLabs/VantomasWebsite
src/SecretSanta/Donee/Resolver.php
Resolver.getResolverHandlerChain
private function getResolverHandlerChain() { $randomResolver = $this->resolverFactory->create(Random::class); $nonMutualResolver = $this->resolverFactory->create(NonMutual::class, $randomResolver); return $this->resolverFactory->create(FromExistingPair::class, $nonMutualResolver); }
php
private function getResolverHandlerChain() { $randomResolver = $this->resolverFactory->create(Random::class); $nonMutualResolver = $this->resolverFactory->create(NonMutual::class, $randomResolver); return $this->resolverFactory->create(FromExistingPair::class, $nonMutualResolver); }
[ "private", "function", "getResolverHandlerChain", "(", ")", "{", "$", "randomResolver", "=", "$", "this", "->", "resolverFactory", "->", "create", "(", "Random", "::", "class", ")", ";", "$", "nonMutualResolver", "=", "$", "this", "->", "resolverFactory", "->"...
Builds and returns the resolver handler chain @return ResolverHandlerInterface
[ "Builds", "and", "returns", "the", "resolver", "handler", "chain" ]
7f85f2b45bdf5ed9fa9d320c805c416bf99cd668
https://github.com/DreadLabs/VantomasWebsite/blob/7f85f2b45bdf5ed9fa9d320c805c416bf99cd668/src/SecretSanta/Donee/Resolver.php#L93-L99
199,891
BapCat/Remodel
src/Registry.php
Registry.register
public function register(EntityDefinition $builder): void { $this->defs[$builder->full_name] = $builder; $this->unchecked[] = $builder; $binding_name = str_replace('\\', '.', $builder->full_name); $this->ioc->bind('bap.remodel.scopes.' . $binding_name, function() use($builder) { return $builder->...
php
public function register(EntityDefinition $builder): void { $this->defs[$builder->full_name] = $builder; $this->unchecked[] = $builder; $binding_name = str_replace('\\', '.', $builder->full_name); $this->ioc->bind('bap.remodel.scopes.' . $binding_name, function() use($builder) { return $builder->...
[ "public", "function", "register", "(", "EntityDefinition", "$", "builder", ")", ":", "void", "{", "$", "this", "->", "defs", "[", "$", "builder", "->", "full_name", "]", "=", "$", "builder", ";", "$", "this", "->", "unchecked", "[", "]", "=", "$", "b...
Register an Entity definition. Note this method DOES NOT generate the classes. They are generated when needed. @param EntityDefinition $builder @return void
[ "Register", "an", "Entity", "definition", ".", "Note", "this", "method", "DOES", "NOT", "generate", "the", "classes", ".", "They", "are", "generated", "when", "needed", "." ]
80fcdec8bca22b88c5af9a0a93622c796cf3e7b1
https://github.com/BapCat/Remodel/blob/80fcdec8bca22b88c5af9a0a93622c796cf3e7b1/src/Registry.php#L66-L96
199,892
GrottoPress/wordpress-meta-box
src/lib/MetaBox.php
MetaBox.preSaveChecksPassed
protected function preSaveChecksPassed(int $post_id): bool { if ($post_id < 1) { return false; } if (\defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return false; } if (!\current_user_can( \get_post_type_object(\get_post_type($post_id))->...
php
protected function preSaveChecksPassed(int $post_id): bool { if ($post_id < 1) { return false; } if (\defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return false; } if (!\current_user_can( \get_post_type_object(\get_post_type($post_id))->...
[ "protected", "function", "preSaveChecksPassed", "(", "int", "$", "post_id", ")", ":", "bool", "{", "if", "(", "$", "post_id", "<", "1", ")", "{", "return", "false", ";", "}", "if", "(", "\\", "defined", "(", "'DOING_AUTOSAVE'", ")", "&&", "DOING_AUTOSAVE...
Checks to perform prior save
[ "Checks", "to", "perform", "prior", "save" ]
c8c498e29da5f91fbc08d357dac3afdb391fc820
https://github.com/GrottoPress/wordpress-meta-box/blob/c8c498e29da5f91fbc08d357dac3afdb391fc820/src/lib/MetaBox.php#L184-L208
199,893
fridge-project/dbal
src/Fridge/DBAL/Schema/Schema.php
Schema.createTable
public function createTable( $name, array $columns = array(), array $primaryKey = array(), array $foreignKeys = array(), array $indexes = array(), array $checks = array() ) { $table = new Table($name); foreach ($columns as $column) { if (!...
php
public function createTable( $name, array $columns = array(), array $primaryKey = array(), array $foreignKeys = array(), array $indexes = array(), array $checks = array() ) { $table = new Table($name); foreach ($columns as $column) { if (!...
[ "public", "function", "createTable", "(", "$", "name", ",", "array", "$", "columns", "=", "array", "(", ")", ",", "array", "$", "primaryKey", "=", "array", "(", ")", ",", "array", "$", "foreignKeys", "=", "array", "(", ")", ",", "array", "$", "indexe...
Creates and adds a new table. @param string $name The table name. @param array $columns The table columns. @param array $primaryKey The table primary key. @param array $foreignKeys The table foreign keys. @param array $indexes The table indexes. @param array $checks The table checks. @return...
[ "Creates", "and", "adds", "a", "new", "table", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Schema.php#L61-L133
199,894
fridge-project/dbal
src/Fridge/DBAL/Schema/Schema.php
Schema.setTables
public function setTables(array $tables) { $this->tables = array(); foreach ($tables as $table) { $this->addTable($table); } }
php
public function setTables(array $tables) { $this->tables = array(); foreach ($tables as $table) { $this->addTable($table); } }
[ "public", "function", "setTables", "(", "array", "$", "tables", ")", "{", "$", "this", "->", "tables", "=", "array", "(", ")", ";", "foreach", "(", "$", "tables", "as", "$", "table", ")", "{", "$", "this", "->", "addTable", "(", "$", "table", ")", ...
Sets the schema tables. @param array $tables The schema tables.
[ "Sets", "the", "schema", "tables", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Schema.php#L160-L167
199,895
fridge-project/dbal
src/Fridge/DBAL/Schema/Schema.php
Schema.getTable
public function getTable($name) { if (!$this->hasTable($name)) { throw SchemaException::schemaTableDoesNotExist($this->getName(), $name); } return $this->tables[$name]; }
php
public function getTable($name) { if (!$this->hasTable($name)) { throw SchemaException::schemaTableDoesNotExist($this->getName(), $name); } return $this->tables[$name]; }
[ "public", "function", "getTable", "(", "$", "name", ")", "{", "if", "(", "!", "$", "this", "->", "hasTable", "(", "$", "name", ")", ")", "{", "throw", "SchemaException", "::", "schemaTableDoesNotExist", "(", "$", "this", "->", "getName", "(", ")", ",",...
Gets a table. @param string $name The table name. @throws \Fridge\DBAL\Exception\SchemaException If the table does not exist. @return \Fridge\DBAL\Schema\Table The table.
[ "Gets", "a", "table", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Schema.php#L190-L197
199,896
fridge-project/dbal
src/Fridge/DBAL/Schema/Schema.php
Schema.addTable
public function addTable(Table $table) { if ($this->hasTable($table->getName())) { throw SchemaException::schemaTableAlreadyExists($this->getName(), $table->getName()); } $this->tables[$table->getName()] = $table; if ($table->getSchema() !== $this) { $table-...
php
public function addTable(Table $table) { if ($this->hasTable($table->getName())) { throw SchemaException::schemaTableAlreadyExists($this->getName(), $table->getName()); } $this->tables[$table->getName()] = $table; if ($table->getSchema() !== $this) { $table-...
[ "public", "function", "addTable", "(", "Table", "$", "table", ")", "{", "if", "(", "$", "this", "->", "hasTable", "(", "$", "table", "->", "getName", "(", ")", ")", ")", "{", "throw", "SchemaException", "::", "schemaTableAlreadyExists", "(", "$", "this",...
Adds a table to the schema. @param \Fridge\DBAL\Schema\Table $table The table to add. @throws \Fridge\DBAL\Exception\SchemaException If the table already exists.
[ "Adds", "a", "table", "to", "the", "schema", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Schema.php#L206-L217
199,897
fridge-project/dbal
src/Fridge/DBAL/Schema/Schema.php
Schema.createSequence
public function createSequence($name, $initialValue = 1, $incrementSize = 1) { $sequence = new Sequence($name, $initialValue, $incrementSize); $this->addSequence($sequence); return $sequence; }
php
public function createSequence($name, $initialValue = 1, $incrementSize = 1) { $sequence = new Sequence($name, $initialValue, $incrementSize); $this->addSequence($sequence); return $sequence; }
[ "public", "function", "createSequence", "(", "$", "name", ",", "$", "initialValue", "=", "1", ",", "$", "incrementSize", "=", "1", ")", "{", "$", "sequence", "=", "new", "Sequence", "(", "$", "name", ",", "$", "initialValue", ",", "$", "incrementSize", ...
Creates and adds a new sequence. @param string $name The sequence name. @param integer $initialValue The sequence initial value. @param integer $incrementSize The sequence increment size. @return \Fridge\DBAL\Schema\Sequence The new sequence.
[ "Creates", "and", "adds", "a", "new", "sequence", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Schema.php#L269-L275
199,898
fridge-project/dbal
src/Fridge/DBAL/Schema/Schema.php
Schema.setSequences
public function setSequences(array $sequences) { $this->sequences = array(); foreach ($sequences as $sequence) { $this->addSequence($sequence); } }
php
public function setSequences(array $sequences) { $this->sequences = array(); foreach ($sequences as $sequence) { $this->addSequence($sequence); } }
[ "public", "function", "setSequences", "(", "array", "$", "sequences", ")", "{", "$", "this", "->", "sequences", "=", "array", "(", ")", ";", "foreach", "(", "$", "sequences", "as", "$", "sequence", ")", "{", "$", "this", "->", "addSequence", "(", "$", ...
Sets the schema sequences. @param array $sequences The schema sequences.
[ "Sets", "the", "schema", "sequences", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Schema.php#L302-L309
199,899
fridge-project/dbal
src/Fridge/DBAL/Schema/Schema.php
Schema.getSequence
public function getSequence($name) { if (!$this->hasSequence($name)) { throw SchemaException::schemaSequenceDoesNotExist($this->getName(), $name); } return $this->sequences[$name]; }
php
public function getSequence($name) { if (!$this->hasSequence($name)) { throw SchemaException::schemaSequenceDoesNotExist($this->getName(), $name); } return $this->sequences[$name]; }
[ "public", "function", "getSequence", "(", "$", "name", ")", "{", "if", "(", "!", "$", "this", "->", "hasSequence", "(", "$", "name", ")", ")", "{", "throw", "SchemaException", "::", "schemaSequenceDoesNotExist", "(", "$", "this", "->", "getName", "(", ")...
Gets a sequence. @param string $name The sequence name. @return \Fridge\DBAL\Schema\Sequence The sequence. @throws \Fridge\DBAL\Exception\SchemaException If the sequence does not exist.
[ "Gets", "a", "sequence", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Schema.php#L332-L339