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
42,900
mage2pro/core
Payment/Settings.php
Settings._options
final protected function _options($source) {return dfc($this, function($s) {return new Options( $this, is_object($s) ? $s : df_sc($s, ConfigSource::class) );}, func_get_args());}
php
final protected function _options($source) {return dfc($this, function($s) {return new Options( $this, is_object($s) ? $s : df_sc($s, ConfigSource::class) );}, func_get_args());}
[ "final", "protected", "function", "_options", "(", "$", "source", ")", "{", "return", "dfc", "(", "$", "this", ",", "function", "(", "$", "s", ")", "{", "return", "new", "Options", "(", "$", "this", ",", "is_object", "(", "$", "s", ")", "?", "$", ...
2017-03-03 @used-by \Df\GingerPaymentsBase\Settings::options() @used-by \Dfe\AllPay\Settings::options() @used-by \Dfe\AlphaCommerceHub\Settings::options() @used-by \Dfe\IPay88\Settings::options() @used-by \Dfe\YandexKassa\Settings::options() @param string|ConfigSource $source @return Options
[ "2017", "-", "03", "-", "03" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Settings.php#L189-L191
42,901
mage2pro/core
Framework/Mail/TransportObserver.php
TransportObserver.execute
final function execute(Ob $ob) { if (dfs($this)->enable()) { $ob[P::CONTAINER][P::K_TRANSPORT] = df_con($this, 'Transport'); } }
php
final function execute(Ob $ob) { if (dfs($this)->enable()) { $ob[P::CONTAINER][P::K_TRANSPORT] = df_con($this, 'Transport'); } }
[ "final", "function", "execute", "(", "Ob", "$", "ob", ")", "{", "if", "(", "dfs", "(", "$", "this", ")", "->", "enable", "(", ")", ")", "{", "$", "ob", "[", "P", "::", "CONTAINER", "]", "[", "P", "::", "K_TRANSPORT", "]", "=", "df_con", "(", ...
2018-01-28 @override @see IOb::execute() @used-by \Magento\Framework\Event\Invoker\InvokerDefault::_callObserverMethod() @param Ob $ob
[ "2018", "-", "01", "-", "28" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Mail/TransportObserver.php#L19-L23
42,902
mage2pro/core
Payment/BankCardNetworkDetector.php
BankCardNetworkDetector.label
static function label($c) {return dftr($c, [ self::AE => 'American Express' ,self::DN => 'Diners Club' ,self::DS => 'Discover' ,self::JC => 'JCB' ,self::MC => 'MasterCard' ,self::VI => 'Visa' ]);}
php
static function label($c) {return dftr($c, [ self::AE => 'American Express' ,self::DN => 'Diners Club' ,self::DS => 'Discover' ,self::JC => 'JCB' ,self::MC => 'MasterCard' ,self::VI => 'Visa' ]);}
[ "static", "function", "label", "(", "$", "c", ")", "{", "return", "dftr", "(", "$", "c", ",", "[", "self", "::", "AE", "=>", "'American Express'", ",", "self", "::", "DN", "=>", "'Diners Club'", ",", "self", "::", "DS", "=>", "'Discover'", ",", "self...
2018-12-19 @used-by \Dfe\Vantiv\Facade\Card::brand() @param string $c @return string
[ "2018", "-", "12", "-", "19" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/BankCardNetworkDetector.php#L11-L18
42,903
mage2pro/core
Customer/Setup/UpgradeData.php
UpgradeData._process
final protected function _process() { /** * 2016-08-22 * Помимо добавления поля в таблицу «customer_entity» надо ещё добавить атрибут, * иначе данные не будут сохраняться: * $attribute = $this->getAttribute($k); * if (empty($attribute)) { * continue; * } * https://github.com/magento/magento2/blob/2.1.0/app/code/Magento/Eav/Model/Entity/AbstractEntity.php#L1262-L1265 */ if ($this->v('1.7.4')) { df_eav_setup()->addAttribute('customer', UpgradeSchema::F__DF, [ 'input' => 'text' ,'label' => 'Mage2.PRO' ,'position' => 1000 ,'required' => false ,'sort_order' => 1000 ,'system' => false ,'type' => 'static' ,'visible' => false ]); } }
php
final protected function _process() { /** * 2016-08-22 * Помимо добавления поля в таблицу «customer_entity» надо ещё добавить атрибут, * иначе данные не будут сохраняться: * $attribute = $this->getAttribute($k); * if (empty($attribute)) { * continue; * } * https://github.com/magento/magento2/blob/2.1.0/app/code/Magento/Eav/Model/Entity/AbstractEntity.php#L1262-L1265 */ if ($this->v('1.7.4')) { df_eav_setup()->addAttribute('customer', UpgradeSchema::F__DF, [ 'input' => 'text' ,'label' => 'Mage2.PRO' ,'position' => 1000 ,'required' => false ,'sort_order' => 1000 ,'system' => false ,'type' => 'static' ,'visible' => false ]); } }
[ "final", "protected", "function", "_process", "(", ")", "{", "/**\n\t\t * 2016-08-22\n\t\t * Помимо добавления поля в таблицу «customer_entity» надо ещё добавить атрибут,\n\t\t * иначе данные не будут сохраняться:\n\t\t *\t\t$attribute = $this->getAttribute($k);\n\t\t *\t\tif (empty($attribute)) {\n\t...
2017-10-14 @override @see \Df\Framework\Upgrade::_process() @used-by \Df\Framework\Upgrade::process()
[ "2017", "-", "10", "-", "14" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Customer/Setup/UpgradeData.php#L18-L41
42,904
mage2pro/core
Directory/FE/Currency.php
Currency.getValue
function getValue() { $chosen = parent::getValue(); /** @var string|null $chosen */ $allowed = $this->dfValues(); /** @var string[] $allowed */ // 2016-11-13 // Обрабатываем тот случай, когда значения self::$ORDER и self::$BASE были разрешены // в предыдущих версиях модуля, а потом стали запрещены. // Так, например, было с модулем Square: // там на сегодняшний день разрешены всего 2 валюты: USD и CAD, // поэтому я решил убрать опции self::$ORDER и self::$BASE, // однако чтобы это не поломало магазины тех клиентов, // у которых одно из этих значений уже выбрано (а self::$ORDER было значением по умолчанию). return $allowed && (!$chosen || !in_array($chosen, $allowed)) ? df_first($allowed) : ($chosen ?: self::$ORDER) ; }
php
function getValue() { $chosen = parent::getValue(); /** @var string|null $chosen */ $allowed = $this->dfValues(); /** @var string[] $allowed */ // 2016-11-13 // Обрабатываем тот случай, когда значения self::$ORDER и self::$BASE были разрешены // в предыдущих версиях модуля, а потом стали запрещены. // Так, например, было с модулем Square: // там на сегодняшний день разрешены всего 2 валюты: USD и CAD, // поэтому я решил убрать опции self::$ORDER и self::$BASE, // однако чтобы это не поломало магазины тех клиентов, // у которых одно из этих значений уже выбрано (а self::$ORDER было значением по умолчанию). return $allowed && (!$chosen || !in_array($chosen, $allowed)) ? df_first($allowed) : ($chosen ?: self::$ORDER) ; }
[ "function", "getValue", "(", ")", "{", "$", "chosen", "=", "parent", "::", "getValue", "(", ")", ";", "/** @var string|null $chosen */", "$", "allowed", "=", "$", "this", "->", "dfValues", "(", ")", ";", "/** @var string[] $allowed */", "// 2016-11-13", "// Обра...
2016-09-04 @override @see \Df\Framework\Form\Element\Select::getValue() @used-by \Df\Framework\Form\Element\Select2::setRenderer() @see \Dfe\Stripe\FE\Currency::getValue() @return string|null
[ "2016", "-", "09", "-", "04" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Directory/FE/Currency.php#L16-L30
42,905
mage2pro/core
Directory/FE/Currency.php
Currency.map
private static function map($store = null, $orderCurrency = null) {return dfcf( function($store = null, $orderCurrency = null) {return [ self::$BASE => df_currency_base_c($store) ,self::$ORDER => $orderCurrency ?: df_currency_current_c($store) ];} , func_get_args());}
php
private static function map($store = null, $orderCurrency = null) {return dfcf( function($store = null, $orderCurrency = null) {return [ self::$BASE => df_currency_base_c($store) ,self::$ORDER => $orderCurrency ?: df_currency_current_c($store) ];} , func_get_args());}
[ "private", "static", "function", "map", "(", "$", "store", "=", "null", ",", "$", "orderCurrency", "=", "null", ")", "{", "return", "dfcf", "(", "function", "(", "$", "store", "=", "null", ",", "$", "orderCurrency", "=", "null", ")", "{", "return", "...
2016-09-05 @used-by v() @param null|string|int|S|Store $store [optional] @param string|null $orderCurrency [optional] @return array(string => string|null)
[ "2016", "-", "09", "-", "05" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Directory/FE/Currency.php#L94-L99
42,906
mage2pro/core
Payment/Operation.php
Operation.customerNameA
private function customerNameA() {return dfc($this, function() { /** @var O $o */ $o = $this->o(); /** @var OA $ba */ $ba = $this->addressB(); /** @var C|DFCustomer $c */ /** @var string|null $f */ return ($f = $o->getCustomerFirstname()) ? [$f, $o->getCustomerLastname()] : ( ($c = $o->getCustomer()) && ($f = $c->getFirstname()) ? [$f, $c->getLastname()] : ( $f = $ba->getFirstname() ? [$f, $ba->getLastname()] : ( ($sa = $this->addressS()) && ($f = $sa->getFirstname()) ? [$f, $sa->getLastname()] : [null, null] ) ) ); });}
php
private function customerNameA() {return dfc($this, function() { /** @var O $o */ $o = $this->o(); /** @var OA $ba */ $ba = $this->addressB(); /** @var C|DFCustomer $c */ /** @var string|null $f */ return ($f = $o->getCustomerFirstname()) ? [$f, $o->getCustomerLastname()] : ( ($c = $o->getCustomer()) && ($f = $c->getFirstname()) ? [$f, $c->getLastname()] : ( $f = $ba->getFirstname() ? [$f, $ba->getLastname()] : ( ($sa = $this->addressS()) && ($f = $sa->getFirstname()) ? [$f, $sa->getLastname()] : [null, null] ) ) ); });}
[ "private", "function", "customerNameA", "(", ")", "{", "return", "dfc", "(", "$", "this", ",", "function", "(", ")", "{", "/** @var O $o */", "$", "o", "=", "$", "this", "->", "o", "(", ")", ";", "/** @var OA $ba */", "$", "ba", "=", "$", "this", "->...
2016-08-26 @return array(string|null)
[ "2016", "-", "08", "-", "26" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Operation.php#L518-L531
42,907
mage2pro/core
Payment/TM.php
TM.confirmed
function confirmed() {return dfc($this, function() {/** @var T|null|false $t */ return df_order($this->_ii)->hasInvoices() // 2017-03-27 // Тот случай, когда платёж только авторизован. // Magento не создаёт в этом случае invoice // @todo Может, надо просто создавать invoice при авторизации платежа? || ($t = $this->tReq(false)) && (T::TYPE_AUTH === $t->getTxnType()) /** * 2017-08-31 * It is for modules with a redirection (PayPal clones). * @see \Dfe\PostFinance\W\Event::ttCurrent() * https://github.com/mage2pro/postfinance/blob/0.1.7/W/Event.php#L35 */ || df_find(function(T $t) {return T::TYPE_AUTH === $t->getTxnType();}, $this->tResponses()) ;});}
php
function confirmed() {return dfc($this, function() {/** @var T|null|false $t */ return df_order($this->_ii)->hasInvoices() // 2017-03-27 // Тот случай, когда платёж только авторизован. // Magento не создаёт в этом случае invoice // @todo Может, надо просто создавать invoice при авторизации платежа? || ($t = $this->tReq(false)) && (T::TYPE_AUTH === $t->getTxnType()) /** * 2017-08-31 * It is for modules with a redirection (PayPal clones). * @see \Dfe\PostFinance\W\Event::ttCurrent() * https://github.com/mage2pro/postfinance/blob/0.1.7/W/Event.php#L35 */ || df_find(function(T $t) {return T::TYPE_AUTH === $t->getTxnType();}, $this->tResponses()) ;});}
[ "function", "confirmed", "(", ")", "{", "return", "dfc", "(", "$", "this", ",", "function", "(", ")", "{", "/** @var T|null|false $t */", "return", "df_order", "(", "$", "this", "->", "_ii", ")", "->", "hasInvoices", "(", ")", "// 2017-03-27", "// Тот случай...
2017-03-25 2017-11-11 The @see \Magento\Sales\Api\Data\TransactionInterface::TYPE_AUTH constant is absent in Magento < 2.1.0, but is present as @uses \Magento\Sales\Model\Order\Payment\Transaction::TYPE_AUTH https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Sales/Model/Order/Payment/Transaction.php#L37 https://github.com/magento/magento2/blob/2.0.17/app/code/Magento/Sales/Api/Data/TransactionInterface.php @used-by \Df\Payment\Block\Info::prepareToRendering() @return bool
[ "2017", "-", "03", "-", "25", "2017", "-", "11", "-", "11", "The" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/TM.php#L25-L39
42,908
mage2pro/core
Payment/TM.php
TM.res0
function res0($k = null) {return dfak($this, function() {return df_trd( $this->tReq(), M::IIA_TR_RESPONSE );}, $k);}
php
function res0($k = null) {return dfak($this, function() {return df_trd( $this->tReq(), M::IIA_TR_RESPONSE );}, $k);}
[ "function", "res0", "(", "$", "k", "=", "null", ")", "{", "return", "dfak", "(", "$", "this", ",", "function", "(", ")", "{", "return", "df_trd", "(", "$", "this", "->", "tReq", "(", ")", ",", "M", "::", "IIA_TR_RESPONSE", ")", ";", "}", ",", "...
2017-03-29 It returns a response to the primary request to the PSP API. @used-by \Df\GingerPaymentsBase\Block\Info::res0() @used-by \Df\Payment\Choice::res0() @used-by \Df\StripeClone\Block\Info::cardData() @used-by \Dfe\Moip\Block\Info\Boleto::prepare() @used-by \Dfe\Moip\Block\Info\Boleto::rCustomerAccount() @used-by \Dfe\Moip\Block\Info\Boleto::url() @used-by \Dfe\Square\Block\Info::prepare() @used-by \Dfe\Stripe\Block\Info::cardData() @param string|string[]|null $k [optional] @return array(string => string)|string|null
[ "2017", "-", "03", "-", "29", "It", "returns", "a", "response", "to", "the", "primary", "request", "to", "the", "PSP", "API", "." ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/TM.php#L98-L100
42,909
mage2pro/core
Payment/TM.php
TM.responses
private function responses() {return dfc($this, function() {return array_map(function(T $t) {return F::s($this->_m, df_trd($t))->e() ;}, $this->tResponses());});}
php
private function responses() {return dfc($this, function() {return array_map(function(T $t) {return F::s($this->_m, df_trd($t))->e() ;}, $this->tResponses());});}
[ "private", "function", "responses", "(", ")", "{", "return", "dfc", "(", "$", "this", ",", "function", "(", ")", "{", "return", "array_map", "(", "function", "(", "T", "$", "t", ")", "{", "return", "F", "::", "s", "(", "$", "this", "->", "_m", ",...
2016-07-18 2017-11-12 It returns all the payment's transactions except the first one, wrapped by event instances. @used-by response() @return Ev[]
[ "2016", "-", "07", "-", "18", "2017", "-", "11", "-", "12", "It", "returns", "all", "the", "payment", "s", "transactions", "except", "the", "first", "one", "wrapped", "by", "event", "instances", "." ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/TM.php#L152-L154
42,910
mage2pro/core
Payment/TM.php
TM.tResponses
private function tResponses() {return dfc($this, function() {return !($p = $this->tReq(false)) ? [] : df_sort($p->getChildTransactions()) ;});}
php
private function tResponses() {return dfc($this, function() {return !($p = $this->tReq(false)) ? [] : df_sort($p->getChildTransactions()) ;});}
[ "private", "function", "tResponses", "(", ")", "{", "return", "dfc", "(", "$", "this", ",", "function", "(", ")", "{", "return", "!", "(", "$", "p", "=", "$", "this", "->", "tReq", "(", "false", ")", ")", "?", "[", "]", ":", "df_sort", "(", "$"...
2017-08-31 2017-11-12 It returns all the payment's transactions except the first one. @used-by confirmed() @used-by responses() @return T[]
[ "2017", "-", "08", "-", "31", "2017", "-", "11", "-", "12", "It", "returns", "all", "the", "payment", "s", "transactions", "except", "the", "first", "one", "." ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/TM.php#L163-L165
42,911
mage2pro/core
Payment/W/Responder.php
Responder.setSoftFailure
final function setSoftFailure($v) {$this->set( ($v = is_string($v) ? __($v) : $v) instanceof Phrase ? Text::i($v) : $v );}
php
final function setSoftFailure($v) {$this->set( ($v = is_string($v) ? __($v) : $v) instanceof Phrase ? Text::i($v) : $v );}
[ "final", "function", "setSoftFailure", "(", "$", "v", ")", "{", "$", "this", "->", "set", "(", "(", "$", "v", "=", "is_string", "(", "$", "v", ")", "?", "__", "(", "$", "v", ")", ":", "$", "v", ")", "instanceof", "Phrase", "?", "Text", "::", ...
2017-09-13 @used-by \Df\Payment\W\Strategy::softFailure() @param wResult|Phrase|string|null $v
[ "2017", "-", "09", "-", "13" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/W/Responder.php#L66-L68
42,912
mage2pro/core
Config/Source/LetterCase.php
LetterCase.map
protected function map() { /** @var string|null $sample */ $sample = $this->f('dfSample'); /** @var string[] $values */ $values = [self::_DEFAULT, self::$UCFIRST, self::$UCWORDS, self::$UPPERCASE, self::$LOWERCASE]; /** @var string[] $labels */ $labels = [ 'As Is' , 'Uppercase first letter' , 'Uppercase Each Word\'s First Letter' ,'UPPERCASE' ,'lowercase' ]; return array_combine( $values ,!$sample ? $labels : array_map(function($value, $label) use($sample) { return sprintf('%s (%s)', self::apply($sample, $value), $label); }, $values, $labels) //: df_map([__CLASS__, 'apply'], $keys, [], $sample) ); }
php
protected function map() { /** @var string|null $sample */ $sample = $this->f('dfSample'); /** @var string[] $values */ $values = [self::_DEFAULT, self::$UCFIRST, self::$UCWORDS, self::$UPPERCASE, self::$LOWERCASE]; /** @var string[] $labels */ $labels = [ 'As Is' , 'Uppercase first letter' , 'Uppercase Each Word\'s First Letter' ,'UPPERCASE' ,'lowercase' ]; return array_combine( $values ,!$sample ? $labels : array_map(function($value, $label) use($sample) { return sprintf('%s (%s)', self::apply($sample, $value), $label); }, $values, $labels) //: df_map([__CLASS__, 'apply'], $keys, [], $sample) ); }
[ "protected", "function", "map", "(", ")", "{", "/** @var string|null $sample */", "$", "sample", "=", "$", "this", "->", "f", "(", "'dfSample'", ")", ";", "/** @var string[] $values */", "$", "values", "=", "[", "self", "::", "_DEFAULT", ",", "self", "::", "...
2015-11-14 @override @see \Df\Config\Source::map() @used-by \Df\Config\Source::toOptionArray() @return array(string => string)
[ "2015", "-", "11", "-", "14" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Config/Source/LetterCase.php#L12-L34
42,913
mage2pro/core
StripeClone/Method.php
Method.charge
final function charge($capture = true) { df_sentry_extra($this, 'Amount', $a = dfp_due($this)); /** @var float $a */ df_sentry_extra($this, 'Need Capture?', df_bts($capture)); /** * 2017-11-11 * Despite of its name, @uses \Magento\Sales\Model\Order\Payment::getAuthorizationTransaction() * simply returns the previous transaction, * and it can be not only an `authorization` transaction, * but a transaction of another type (e.g. `payment`) too. * public function getAuthorizationTransaction() { * return $this->transactionManager->getAuthorizationTransaction( * $this->getParentTransactionId(), * $this->getId(), * $this->getOrder()->getId() * ); * } * The code is the same in Magento 2.0.0 - 2.2.1: * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Sales/Model/Order/Payment.php#L1242-#L1253 * https://github.com/magento/magento2/blob/2.2.1/app/code/Magento/Sales/Model/Order/Payment.php#L1316-L1327 * @see \Magento\Sales\Model\Order\Payment\Transaction\Manager::getAuthorizationTransaction() * public function getAuthorizationTransaction($parentTransactionId, $paymentId, $orderId) { * $transaction = false; * if ($parentTransactionId) { * $transaction = $this->transactionRepository->getByTransactionId( * $parentTransactionId, * $paymentId, * $orderId * ); * } * return $transaction ?: $this->transactionRepository->getByTransactionType( * Transaction::TYPE_AUTH, * $paymentId, * $orderId * ); * } * The code is the same in Magento 2.0.0 - 2.2.1: * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Sales/Model/Order/Payment/Transaction/Manager.php#L31-L47 * https://github.com/magento/magento2/blob/2.2.1/app/code/Magento/Sales/Model/Order/Payment/Transaction/Manager.php#L31-L47 */ $tPrev = !$capture ? null : $this->ii()->getAuthorizationTransaction(); /** @var T|false|null $tPrev */ /** * 2017-11-11 * The @see \Magento\Sales\Api\Data\TransactionInterface::TYPE_AUTH constant * is absent in Magento < 2.1.0, * but is present as @uses \Magento\Sales\Model\Order\Payment\Transaction::TYPE_AUTH * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Sales/Model/Order/Payment/Transaction.php#L37 * https://github.com/magento/magento2/blob/2.0.17/app/code/Magento/Sales/Api/Data/TransactionInterface.php */ if (!$tPrev || T::TYPE_AUTH !== $tPrev->getTxnType()) { $this->chargeNew($capture); } else { /** @var string $txnId */ df_sentry_extra($this, 'Parent Transaction ID', $txnId = $tPrev->getTxnId()); df_sentry_extra($this, 'Charge ID', $id = $this->i2e($txnId)); /** @var string $id */ $this->transInfo($this->fCharge()->capturePreauthorized($id, $this->amountFormat($a))); // 2016-12-16 // Система в этом сценарии по-умолчанию формирует идентификатор транзации как // «<идентификатор родительской транзации>-capture». // У нас же идентификатор родительской транзации имеет окончание «-authorize», // и оно нам реально нужно (смотрите комментарий к ветке else ниже), // поэтому здесь мы окончание «-authorize» вручную подменяем на «-capture». $this->ii()->setTransactionId($this->e2i($id, Ev::T_CAPTURE)); } }
php
final function charge($capture = true) { df_sentry_extra($this, 'Amount', $a = dfp_due($this)); /** @var float $a */ df_sentry_extra($this, 'Need Capture?', df_bts($capture)); /** * 2017-11-11 * Despite of its name, @uses \Magento\Sales\Model\Order\Payment::getAuthorizationTransaction() * simply returns the previous transaction, * and it can be not only an `authorization` transaction, * but a transaction of another type (e.g. `payment`) too. * public function getAuthorizationTransaction() { * return $this->transactionManager->getAuthorizationTransaction( * $this->getParentTransactionId(), * $this->getId(), * $this->getOrder()->getId() * ); * } * The code is the same in Magento 2.0.0 - 2.2.1: * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Sales/Model/Order/Payment.php#L1242-#L1253 * https://github.com/magento/magento2/blob/2.2.1/app/code/Magento/Sales/Model/Order/Payment.php#L1316-L1327 * @see \Magento\Sales\Model\Order\Payment\Transaction\Manager::getAuthorizationTransaction() * public function getAuthorizationTransaction($parentTransactionId, $paymentId, $orderId) { * $transaction = false; * if ($parentTransactionId) { * $transaction = $this->transactionRepository->getByTransactionId( * $parentTransactionId, * $paymentId, * $orderId * ); * } * return $transaction ?: $this->transactionRepository->getByTransactionType( * Transaction::TYPE_AUTH, * $paymentId, * $orderId * ); * } * The code is the same in Magento 2.0.0 - 2.2.1: * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Sales/Model/Order/Payment/Transaction/Manager.php#L31-L47 * https://github.com/magento/magento2/blob/2.2.1/app/code/Magento/Sales/Model/Order/Payment/Transaction/Manager.php#L31-L47 */ $tPrev = !$capture ? null : $this->ii()->getAuthorizationTransaction(); /** @var T|false|null $tPrev */ /** * 2017-11-11 * The @see \Magento\Sales\Api\Data\TransactionInterface::TYPE_AUTH constant * is absent in Magento < 2.1.0, * but is present as @uses \Magento\Sales\Model\Order\Payment\Transaction::TYPE_AUTH * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Sales/Model/Order/Payment/Transaction.php#L37 * https://github.com/magento/magento2/blob/2.0.17/app/code/Magento/Sales/Api/Data/TransactionInterface.php */ if (!$tPrev || T::TYPE_AUTH !== $tPrev->getTxnType()) { $this->chargeNew($capture); } else { /** @var string $txnId */ df_sentry_extra($this, 'Parent Transaction ID', $txnId = $tPrev->getTxnId()); df_sentry_extra($this, 'Charge ID', $id = $this->i2e($txnId)); /** @var string $id */ $this->transInfo($this->fCharge()->capturePreauthorized($id, $this->amountFormat($a))); // 2016-12-16 // Система в этом сценарии по-умолчанию формирует идентификатор транзации как // «<идентификатор родительской транзации>-capture». // У нас же идентификатор родительской транзации имеет окончание «-authorize», // и оно нам реально нужно (смотрите комментарий к ветке else ниже), // поэтому здесь мы окончание «-authorize» вручную подменяем на «-capture». $this->ii()->setTransactionId($this->e2i($id, Ev::T_CAPTURE)); } }
[ "final", "function", "charge", "(", "$", "capture", "=", "true", ")", "{", "df_sentry_extra", "(", "$", "this", ",", "'Amount'", ",", "$", "a", "=", "dfp_due", "(", "$", "this", ")", ")", ";", "/** @var float $a */", "df_sentry_extra", "(", "$", "this", ...
2016-03-07 @override @see https://stripe.com/docs/charges @see \Df\Payment\Method::charge() @used-by \Df\Payment\Method::authorize() @used-by \Df\Payment\Method::capture() @used-by \Dfe\Omise\Init\Action::redirectUrl() @param bool|null $capture [optional] @throws \Stripe\Error\Card
[ "2016", "-", "03", "-", "07" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/StripeClone/Method.php#L169-L233
42,914
mage2pro/core
StripeClone/Method.php
Method._refund
final protected function _refund($a) { $ii = $this->ii(); /** @var OP $ii */ /** * 2016-03-17, 2017-11-11 * Despite of its name, @uses \Magento\Sales\Model\Order\Payment::getAuthorizationTransaction() * simply returns the previous transaction, * and it can be not only an `authorization` transaction, * but a transaction of another type (e.g. `payment`) too. * public function getAuthorizationTransaction() { * return $this->transactionManager->getAuthorizationTransaction( * $this->getParentTransactionId(), * $this->getId(), * $this->getOrder()->getId() * ); * } * The code is the same in Magento 2.0.0 - 2.2.1: * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Sales/Model/Order/Payment.php#L1242-#L1253 * https://github.com/magento/magento2/blob/2.2.1/app/code/Magento/Sales/Model/Order/Payment.php#L1316-L1327 * @see \Magento\Sales\Model\Order\Payment\Transaction\Manager::getAuthorizationTransaction() * public function getAuthorizationTransaction($parentTransactionId, $paymentId, $orderId) { * $transaction = false; * if ($parentTransactionId) { * $transaction = $this->transactionRepository->getByTransactionId( * $parentTransactionId, * $paymentId, * $orderId * ); * } * return $transaction ?: $this->transactionRepository->getByTransactionType( * Transaction::TYPE_AUTH, * $paymentId, * $orderId * ); * } * The code is the same in Magento 2.0.0 - 2.2.1: * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Sales/Model/Order/Payment/Transaction/Manager.php#L31-L47 * https://github.com/magento/magento2/blob/2.2.1/app/code/Magento/Sales/Model/Order/Payment/Transaction/Manager.php#L31-L47 * It is exactly what we need, * because the module can be set up to capture payments without a preliminary authorization. */ if ($tPrev = $ii->getAuthorizationTransaction() /** @var T|false $tPrev */) { $id = $this->i2e($tPrev->getTxnId()); /** @var string $id */ // 2016-03-24 // Credit Memo и Invoice отсутствуют в сценарии Authorize / Capture // и присутствуют в сценарии Capture / Refund. $cm = $ii->getCreditmemo(); /** @var CM|null $cm */ $fc = $this->fCharge(); /** @var fCharge $fc */ $resp = $cm ? $fc->refund($id, $this->amountFormat($a)) : $fc->void($id); /** @var object $resp */ $this->transInfo($resp); $ii->setTransactionId($this->e2i($id, $cm ? Ev::T_REFUND : 'void')); if ($cm) { /** * 2017-01-19 * Записаваем идентификатор операции в БД, * чтобы затем, при обработке оповещений от платёжной системы, * проверять, не было ли это оповещение инициировано нашей же операцией, * и если было, то не обрабатывать его повторно: * @see \Df\Payment\W\Strategy\Refund::_handle() * https://github.com/mage2pro/core/blob/1.12.16/StripeClone/WebhookStrategy/Charge/Refunded.php?ts=4#L21-L23 */ dfp_container_add($this->ii(), self::II_TRANS, fRefund::s($this)->transId($resp)); } } }
php
final protected function _refund($a) { $ii = $this->ii(); /** @var OP $ii */ /** * 2016-03-17, 2017-11-11 * Despite of its name, @uses \Magento\Sales\Model\Order\Payment::getAuthorizationTransaction() * simply returns the previous transaction, * and it can be not only an `authorization` transaction, * but a transaction of another type (e.g. `payment`) too. * public function getAuthorizationTransaction() { * return $this->transactionManager->getAuthorizationTransaction( * $this->getParentTransactionId(), * $this->getId(), * $this->getOrder()->getId() * ); * } * The code is the same in Magento 2.0.0 - 2.2.1: * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Sales/Model/Order/Payment.php#L1242-#L1253 * https://github.com/magento/magento2/blob/2.2.1/app/code/Magento/Sales/Model/Order/Payment.php#L1316-L1327 * @see \Magento\Sales\Model\Order\Payment\Transaction\Manager::getAuthorizationTransaction() * public function getAuthorizationTransaction($parentTransactionId, $paymentId, $orderId) { * $transaction = false; * if ($parentTransactionId) { * $transaction = $this->transactionRepository->getByTransactionId( * $parentTransactionId, * $paymentId, * $orderId * ); * } * return $transaction ?: $this->transactionRepository->getByTransactionType( * Transaction::TYPE_AUTH, * $paymentId, * $orderId * ); * } * The code is the same in Magento 2.0.0 - 2.2.1: * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Sales/Model/Order/Payment/Transaction/Manager.php#L31-L47 * https://github.com/magento/magento2/blob/2.2.1/app/code/Magento/Sales/Model/Order/Payment/Transaction/Manager.php#L31-L47 * It is exactly what we need, * because the module can be set up to capture payments without a preliminary authorization. */ if ($tPrev = $ii->getAuthorizationTransaction() /** @var T|false $tPrev */) { $id = $this->i2e($tPrev->getTxnId()); /** @var string $id */ // 2016-03-24 // Credit Memo и Invoice отсутствуют в сценарии Authorize / Capture // и присутствуют в сценарии Capture / Refund. $cm = $ii->getCreditmemo(); /** @var CM|null $cm */ $fc = $this->fCharge(); /** @var fCharge $fc */ $resp = $cm ? $fc->refund($id, $this->amountFormat($a)) : $fc->void($id); /** @var object $resp */ $this->transInfo($resp); $ii->setTransactionId($this->e2i($id, $cm ? Ev::T_REFUND : 'void')); if ($cm) { /** * 2017-01-19 * Записаваем идентификатор операции в БД, * чтобы затем, при обработке оповещений от платёжной системы, * проверять, не было ли это оповещение инициировано нашей же операцией, * и если было, то не обрабатывать его повторно: * @see \Df\Payment\W\Strategy\Refund::_handle() * https://github.com/mage2pro/core/blob/1.12.16/StripeClone/WebhookStrategy/Charge/Refunded.php?ts=4#L21-L23 */ dfp_container_add($this->ii(), self::II_TRANS, fRefund::s($this)->transId($resp)); } } }
[ "final", "protected", "function", "_refund", "(", "$", "a", ")", "{", "$", "ii", "=", "$", "this", "->", "ii", "(", ")", ";", "/** @var OP $ii */", "/**\n\t\t * 2016-03-17, 2017-11-11\n\t\t * Despite of its name, @uses \\Magento\\Sales\\Model\\Order\\Payment::getAuthorization...
2017-01-19 @override @see \Df\Payment\Method::_refund() @used-by \Df\Payment\Method::refund() @param float|null $a
[ "2017", "-", "01", "-", "19" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/StripeClone/Method.php#L460-L523
42,915
mage2pro/core
StripeClone/Method.php
Method.transInfo
private function transInfo($response, array $request = []) { $responseA = fO::s($this)->toArray($response); /** @var array(string => mixed) $responseA */ if ($this->s()->log()) { // 2017-01-12, 2017-12-07 // I log the both request and its response to Sentry, but I log only response to the local log dfp_report($this, $responseA, df_caller_ff()); } $this->iiaSetTRR($request, $responseA); }
php
private function transInfo($response, array $request = []) { $responseA = fO::s($this)->toArray($response); /** @var array(string => mixed) $responseA */ if ($this->s()->log()) { // 2017-01-12, 2017-12-07 // I log the both request and its response to Sentry, but I log only response to the local log dfp_report($this, $responseA, df_caller_ff()); } $this->iiaSetTRR($request, $responseA); }
[ "private", "function", "transInfo", "(", "$", "response", ",", "array", "$", "request", "=", "[", "]", ")", "{", "$", "responseA", "=", "fO", "::", "s", "(", "$", "this", ")", "->", "toArray", "(", "$", "response", ")", ";", "/** @var array(string => m...
2016-12-27 @used-by _refund() @used-by charge() @used-by chargeNew() @param object $response @param array(string => mixed) $request [optional]
[ "2016", "-", "12", "-", "27" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/StripeClone/Method.php#L789-L797
42,916
mage2pro/core
Payment/W/Strategy/CapturePreauthorized.php
CapturePreauthorized._handle
protected function _handle() { $o = $this->o(); /** @var O|DFO $o */ // 2016-12-30 // Мы не должны считать исключительной ситуацией повторное получение // ранее уже полученного оповещения. // В документации к Stripe, например, явно сказано: // «Webhook endpoints may occasionally receive the same event more than once. // We advise you to guard against duplicated event receipts // by making your event processing idempotent.» // https://stripe.com/docs/webhooks#best-practices if (!$o->canInvoice()) { $this->softFailure('The order does not allow an invoice to be created.'); } else { $o->setCustomerNoteNotify(true)->setIsInProcess(true); /** @var Invoice $i */ df_db_transaction()->addObject($i = $this->invoice())->addObject($o)->save(); df_mail_invoice($i); // 2017-09-13 // We do not set a response here, because PayPal clones require a specific response on success. } }
php
protected function _handle() { $o = $this->o(); /** @var O|DFO $o */ // 2016-12-30 // Мы не должны считать исключительной ситуацией повторное получение // ранее уже полученного оповещения. // В документации к Stripe, например, явно сказано: // «Webhook endpoints may occasionally receive the same event more than once. // We advise you to guard against duplicated event receipts // by making your event processing idempotent.» // https://stripe.com/docs/webhooks#best-practices if (!$o->canInvoice()) { $this->softFailure('The order does not allow an invoice to be created.'); } else { $o->setCustomerNoteNotify(true)->setIsInProcess(true); /** @var Invoice $i */ df_db_transaction()->addObject($i = $this->invoice())->addObject($o)->save(); df_mail_invoice($i); // 2017-09-13 // We do not set a response here, because PayPal clones require a specific response on success. } }
[ "protected", "function", "_handle", "(", ")", "{", "$", "o", "=", "$", "this", "->", "o", "(", ")", ";", "/** @var O|DFO $o */", "// 2016-12-30", "// Мы не должны считать исключительной ситуацией повторное получение", "// ранее уже полученного оповещения.", "// В документации...
2017-01-07 @override @see \Df\Payment\W\Strategy::_handle() @used-by \Df\Payment\W\Strategy::handle()
[ "2017", "-", "01", "-", "07" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/W/Strategy/CapturePreauthorized.php#L38-L59
42,917
mage2pro/core
Payment/W/Strategy/CapturePreauthorized.php
CapturePreauthorized.invoice
private function invoice() { $invoiceService = df_o(InvoiceService::class); /** @var InvoiceService $invoiceService */ /** @var Invoice|DfInvoice $result */ if (!($result = $invoiceService->prepareInvoice($this->o()))) { throw new LE(__('We can\'t save the invoice right now.')); } if (!$result->getTotalQty()) { throw new LE(__('You can\'t create an invoice without products.')); } df_register('current_invoice', $result); /** * 2016-03-26 * @used-by \Magento\Sales\Model\Order\Invoice::register() * https://github.com/magento/magento2/blob/2.1.0/app/code/Magento/Sales/Model/Order/Invoice.php#L599-L609 * Используем именно @see \Magento\Sales\Model\Order\Invoice::CAPTURE_ONLINE, * а не @see \Magento\Sales\Model\Order\Invoice::CAPTURE_OFFINE, * чтобы была создана транзакция capture. */ $result->setRequestedCaptureCase(Invoice::CAPTURE_ONLINE); $result->register(); return $result; }
php
private function invoice() { $invoiceService = df_o(InvoiceService::class); /** @var InvoiceService $invoiceService */ /** @var Invoice|DfInvoice $result */ if (!($result = $invoiceService->prepareInvoice($this->o()))) { throw new LE(__('We can\'t save the invoice right now.')); } if (!$result->getTotalQty()) { throw new LE(__('You can\'t create an invoice without products.')); } df_register('current_invoice', $result); /** * 2016-03-26 * @used-by \Magento\Sales\Model\Order\Invoice::register() * https://github.com/magento/magento2/blob/2.1.0/app/code/Magento/Sales/Model/Order/Invoice.php#L599-L609 * Используем именно @see \Magento\Sales\Model\Order\Invoice::CAPTURE_ONLINE, * а не @see \Magento\Sales\Model\Order\Invoice::CAPTURE_OFFINE, * чтобы была создана транзакция capture. */ $result->setRequestedCaptureCase(Invoice::CAPTURE_ONLINE); $result->register(); return $result; }
[ "private", "function", "invoice", "(", ")", "{", "$", "invoiceService", "=", "df_o", "(", "InvoiceService", "::", "class", ")", ";", "/** @var InvoiceService $invoiceService */", "/** @var Invoice|DfInvoice $result */", "if", "(", "!", "(", "$", "result", "=", "$", ...
2016-03-26 @used-by _handle() @return Invoice|DfInvoice @throws LE
[ "2016", "-", "03", "-", "26" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/W/Strategy/CapturePreauthorized.php#L67-L88
42,918
mage2pro/core
Checkout/Block/Messages.php
Messages._toHtml
final protected function _toHtml() { $sess = df_checkout_session(); /** @var Session|DfSession $m */ $m = $sess->getDfMessages(); /** @var array(array(string => bool|Phrase)) $m */ $sess->unsDfMessages(); return !$m ? '' : df_js(__CLASS__, 'messages', ['messages' => $m]); }
php
final protected function _toHtml() { $sess = df_checkout_session(); /** @var Session|DfSession $m */ $m = $sess->getDfMessages(); /** @var array(array(string => bool|Phrase)) $m */ $sess->unsDfMessages(); return !$m ? '' : df_js(__CLASS__, 'messages', ['messages' => $m]); }
[ "final", "protected", "function", "_toHtml", "(", ")", "{", "$", "sess", "=", "df_checkout_session", "(", ")", ";", "/** @var Session|DfSession $m */", "$", "m", "=", "$", "sess", "->", "getDfMessages", "(", ")", ";", "/** @var array(array(string => bool|Phrase)) $m...
2016-07-14 @override @see _P::_toHtml() @used-by _P::toHtml(): $html = $this->_loadCache(); if ($html === false) { if ($this->hasData('translate_inline')) { $this->inlineTranslation->suspend($this->getData('translate_inline')); } $this->_beforeToHtml(); $html = $this->_toHtml(); $this->_saveCache($html); if ($this->hasData('translate_inline')) { $this->inlineTranslation->resume(); } } $html = $this->_afterToHtml($html); https://github.com/magento/magento2/blob/2.2.0/lib/internal/Magento/Framework/View/Element/AbstractBlock.php#L643-L689 @return string
[ "2016", "-", "07", "-", "14" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Checkout/Block/Messages.php#L33-L38
42,919
mage2pro/core
Sentry/Client.php
Client.setProcessorsFromOptions
function setProcessorsFromOptions($options) { $processors = []; foreach (Util::get($options, 'processors', self::getDefaultProcessors()) as $processor) { $new_processor = new $processor($this); if (isset($options['processorOptions']) && is_array($options['processorOptions'])) { if (isset($options['processorOptions'][$processor]) && method_exists($processor, 'setProcessorOptions')) { $new_processor->setProcessorOptions($options['processorOptions'][$processor]); } } $processors[] = $new_processor; } return $processors; }
php
function setProcessorsFromOptions($options) { $processors = []; foreach (Util::get($options, 'processors', self::getDefaultProcessors()) as $processor) { $new_processor = new $processor($this); if (isset($options['processorOptions']) && is_array($options['processorOptions'])) { if (isset($options['processorOptions'][$processor]) && method_exists($processor, 'setProcessorOptions')) { $new_processor->setProcessorOptions($options['processorOptions'][$processor]); } } $processors[] = $new_processor; } return $processors; }
[ "function", "setProcessorsFromOptions", "(", "$", "options", ")", "{", "$", "processors", "=", "[", "]", ";", "foreach", "(", "Util", "::", "get", "(", "$", "options", ",", "'processors'", ",", "self", "::", "getDefaultProcessors", "(", ")", ")", "as", "...
Sets the Processor sub-classes to be used when data is processed before being sent to Sentry. @param $options @return array
[ "Sets", "the", "Processor", "sub", "-", "classes", "to", "be", "used", "when", "data", "is", "processed", "before", "being", "sent", "to", "Sentry", "." ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L282-L296
42,920
mage2pro/core
Sentry/Client.php
Client.parseDSN
static function parseDSN($dsn) { $url = parse_url($dsn); $scheme = (isset($url['scheme']) ? $url['scheme'] : ''); if (!in_array($scheme, array('http', 'https'))) { throw new \InvalidArgumentException('Unsupported Sentry DSN scheme: ' . (!empty($scheme) ? $scheme : '<not set>')); } $netloc = (isset($url['host']) ? $url['host'] : null); $netloc.= (isset($url['port']) ? ':'.$url['port'] : null); $rawpath = (isset($url['path']) ? $url['path'] : null); if ($rawpath) { $pos = strrpos($rawpath, '/', 1); if ($pos !== false) { $path = substr($rawpath, 0, $pos); $project = substr($rawpath, $pos + 1); } else { $path = ''; $project = substr($rawpath, 1); } } else { $project = null; $path = ''; } $username = (isset($url['user']) ? $url['user'] : null); $password = (isset($url['pass']) ? $url['pass'] : null); if (empty($netloc) || empty($project) || empty($username) || empty($password)) { throw new \InvalidArgumentException('Invalid Sentry DSN: ' . $dsn); } return array( 'server' => sprintf('%s://%s%s/api/%s/store/', $scheme, $netloc, $path, $project), 'project' => $project, 'public_key' => $username, 'secret_key' => $password, ); }
php
static function parseDSN($dsn) { $url = parse_url($dsn); $scheme = (isset($url['scheme']) ? $url['scheme'] : ''); if (!in_array($scheme, array('http', 'https'))) { throw new \InvalidArgumentException('Unsupported Sentry DSN scheme: ' . (!empty($scheme) ? $scheme : '<not set>')); } $netloc = (isset($url['host']) ? $url['host'] : null); $netloc.= (isset($url['port']) ? ':'.$url['port'] : null); $rawpath = (isset($url['path']) ? $url['path'] : null); if ($rawpath) { $pos = strrpos($rawpath, '/', 1); if ($pos !== false) { $path = substr($rawpath, 0, $pos); $project = substr($rawpath, $pos + 1); } else { $path = ''; $project = substr($rawpath, 1); } } else { $project = null; $path = ''; } $username = (isset($url['user']) ? $url['user'] : null); $password = (isset($url['pass']) ? $url['pass'] : null); if (empty($netloc) || empty($project) || empty($username) || empty($password)) { throw new \InvalidArgumentException('Invalid Sentry DSN: ' . $dsn); } return array( 'server' => sprintf('%s://%s%s/api/%s/store/', $scheme, $netloc, $path, $project), 'project' => $project, 'public_key' => $username, 'secret_key' => $password, ); }
[ "static", "function", "parseDSN", "(", "$", "dsn", ")", "{", "$", "url", "=", "parse_url", "(", "$", "dsn", ")", ";", "$", "scheme", "=", "(", "isset", "(", "$", "url", "[", "'scheme'", "]", ")", "?", "$", "url", "[", "'scheme'", "]", ":", "''"...
Parses a Raven-compatible DSN and returns an array of its values. @param string $dsn Raven compatible DSN: http://raven.readthedocs.org/en/latest/config/#the-sentry-dsn @return array parsed DSN
[ "Parses", "a", "Raven", "-", "compatible", "DSN", "and", "returns", "an", "array", "of", "its", "values", "." ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L304-L339
42,921
mage2pro/core
Sentry/Client.php
Client.captureException
function captureException(E $e, $data=null, $logger=null, $vars=null) { if (in_array(get_class($e), $this->exclude)) { return null; } if ($data === null) { $data = []; } $eOriginal = $e; /** @var E $eOriginal */ do { $isDFE = $e instanceof DFE; $exc_data = [ 'type' => $isDFE ? $e->sentryType() : get_class($e) ,'value' => $this->serializer->serialize($isDFE ? $e->messageSentry() : $e->getMessage()) ]; /**'exception' * Exception::getTrace doesn't store the point at where the exception * was thrown, so we have to stuff it in ourselves. Ugh. */ $trace = $e->getTrace(); /** * 2016-12-22 * Убираем @see \Magento\Framework\App\ErrorHandler * 2016-12-23 * И @see Breadcrumbs\ErrorHandler тоже убираем. */ /** @var bool $needAddFaceFrame */ $needAddFakeFrame = !self::needSkipFrame($trace[0]); while (self::needSkipFrame($trace[0])) { array_shift($trace); } if ($needAddFakeFrame) { $frame_where_exception_thrown = array( 'file' => $e->getFile(), 'line' => $e->getLine(), ); array_unshift($trace, $frame_where_exception_thrown); } $exc_data['stacktrace'] = array( 'frames' => Stacktrace::get_stack_info( $trace, $this->trace, $vars, $this->message_limit, $this->prefixes, $this->app_path, $this->excluded_app_paths, $this->serializer, $this->reprSerializer ), ); $exceptions[] = $exc_data; } while ($e = $e->getPrevious()); $data['exception'] = array('values' => array_reverse($exceptions),); if ($logger !== null) { $data['logger'] = $logger; } if (empty($data['level'])) { if (method_exists($eOriginal, 'getSeverity')) { $data['level'] = $this->translateSeverity($eOriginal->getSeverity()); } else { $data['level'] = self::ERROR; } } return $this->capture($data, $trace, $vars); }
php
function captureException(E $e, $data=null, $logger=null, $vars=null) { if (in_array(get_class($e), $this->exclude)) { return null; } if ($data === null) { $data = []; } $eOriginal = $e; /** @var E $eOriginal */ do { $isDFE = $e instanceof DFE; $exc_data = [ 'type' => $isDFE ? $e->sentryType() : get_class($e) ,'value' => $this->serializer->serialize($isDFE ? $e->messageSentry() : $e->getMessage()) ]; /**'exception' * Exception::getTrace doesn't store the point at where the exception * was thrown, so we have to stuff it in ourselves. Ugh. */ $trace = $e->getTrace(); /** * 2016-12-22 * Убираем @see \Magento\Framework\App\ErrorHandler * 2016-12-23 * И @see Breadcrumbs\ErrorHandler тоже убираем. */ /** @var bool $needAddFaceFrame */ $needAddFakeFrame = !self::needSkipFrame($trace[0]); while (self::needSkipFrame($trace[0])) { array_shift($trace); } if ($needAddFakeFrame) { $frame_where_exception_thrown = array( 'file' => $e->getFile(), 'line' => $e->getLine(), ); array_unshift($trace, $frame_where_exception_thrown); } $exc_data['stacktrace'] = array( 'frames' => Stacktrace::get_stack_info( $trace, $this->trace, $vars, $this->message_limit, $this->prefixes, $this->app_path, $this->excluded_app_paths, $this->serializer, $this->reprSerializer ), ); $exceptions[] = $exc_data; } while ($e = $e->getPrevious()); $data['exception'] = array('values' => array_reverse($exceptions),); if ($logger !== null) { $data['logger'] = $logger; } if (empty($data['level'])) { if (method_exists($eOriginal, 'getSeverity')) { $data['level'] = $this->translateSeverity($eOriginal->getSeverity()); } else { $data['level'] = self::ERROR; } } return $this->capture($data, $trace, $vars); }
[ "function", "captureException", "(", "E", "$", "e", ",", "$", "data", "=", "null", ",", "$", "logger", "=", "null", ",", "$", "vars", "=", "null", ")", "{", "if", "(", "in_array", "(", "get_class", "(", "$", "e", ")", ",", "$", "this", "->", "e...
Log an exception to sentry @param E|DFE $e @param array $data
[ "Log", "an", "exception", "to", "sentry" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L404-L462
42,922
mage2pro/core
Sentry/Client.php
Client.captureQuery
function captureQuery($query, $level=self::INFO, $engine = '') { $data = array( 'message' => $query, 'level' => $level, 'sentry.interfaces.Query' => array( 'query' => $query ) ); if ($engine !== '') { $data['sentry.interfaces.Query']['engine'] = $engine; } return $this->capture($data, false); }
php
function captureQuery($query, $level=self::INFO, $engine = '') { $data = array( 'message' => $query, 'level' => $level, 'sentry.interfaces.Query' => array( 'query' => $query ) ); if ($engine !== '') { $data['sentry.interfaces.Query']['engine'] = $engine; } return $this->capture($data, false); }
[ "function", "captureQuery", "(", "$", "query", ",", "$", "level", "=", "self", "::", "INFO", ",", "$", "engine", "=", "''", ")", "{", "$", "data", "=", "array", "(", "'message'", "=>", "$", "query", ",", "'level'", "=>", "$", "level", ",", "'sentry...
Log an query to sentry
[ "Log", "an", "query", "to", "sentry" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L485-L499
42,923
mage2pro/core
Sentry/Client.php
Client.send
function send(&$data) { if ( is_callable($this->send_callback) && false === call_user_func_array($this->send_callback, array(&$data)) ) { // if send_callback returns false, end native send return; } if (!$this->server) { return; } if ($this->transport) { return call_user_func($this->transport, $this, $data); } $message = $this->encode($data); $headers = array( 'User-Agent' => $this->getUserAgent(), 'X-Sentry-Auth' => $this->getAuthHeader(), 'Content-Type' => 'application/octet-stream' ); $this->send_remote($this->server, $message, $headers); }
php
function send(&$data) { if ( is_callable($this->send_callback) && false === call_user_func_array($this->send_callback, array(&$data)) ) { // if send_callback returns false, end native send return; } if (!$this->server) { return; } if ($this->transport) { return call_user_func($this->transport, $this, $data); } $message = $this->encode($data); $headers = array( 'User-Agent' => $this->getUserAgent(), 'X-Sentry-Auth' => $this->getAuthHeader(), 'Content-Type' => 'application/octet-stream' ); $this->send_remote($this->server, $message, $headers); }
[ "function", "send", "(", "&", "$", "data", ")", "{", "if", "(", "is_callable", "(", "$", "this", "->", "send_callback", ")", "&&", "false", "===", "call_user_func_array", "(", "$", "this", "->", "send_callback", ",", "array", "(", "&", "$", "data", ")"...
Wrapper to handle encoding and sending data to the Sentry API server. @param array $data Associative array of data to log
[ "Wrapper", "to", "handle", "encoding", "and", "sending", "data", "to", "the", "Sentry", "API", "server", "." ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L781-L808
42,924
mage2pro/core
Sentry/Client.php
Client.send_remote
private function send_remote($url, $data, $headers=[]) { $parts = parse_url($url); $parts['netloc'] = $parts['host'].(isset($parts['port']) ? ':'.$parts['port'] : null); $this->send_http($url, $data, $headers); }
php
private function send_remote($url, $data, $headers=[]) { $parts = parse_url($url); $parts['netloc'] = $parts['host'].(isset($parts['port']) ? ':'.$parts['port'] : null); $this->send_http($url, $data, $headers); }
[ "private", "function", "send_remote", "(", "$", "url", ",", "$", "data", ",", "$", "headers", "=", "[", "]", ")", "{", "$", "parts", "=", "parse_url", "(", "$", "url", ")", ";", "$", "parts", "[", "'netloc'", "]", "=", "$", "parts", "[", "'host'"...
Send data to Sentry @param string $url Full URL to Sentry @param array $data Associative array of data to log @param array $headers Associative array of headers
[ "Send", "data", "to", "Sentry" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L817-L822
42,925
mage2pro/core
Sentry/Client.php
Client.send_http
private function send_http($url, $data, $headers=[]) { if ($this->curl_method == 'async') { $this->_curl_handler->enqueue($url, $data, $headers); } elseif ($this->curl_method == 'exec') { $this->send_http_asynchronous_curl_exec($url, $data, $headers); } else { $this->send_http_synchronous($url, $data, $headers); } }
php
private function send_http($url, $data, $headers=[]) { if ($this->curl_method == 'async') { $this->_curl_handler->enqueue($url, $data, $headers); } elseif ($this->curl_method == 'exec') { $this->send_http_asynchronous_curl_exec($url, $data, $headers); } else { $this->send_http_synchronous($url, $data, $headers); } }
[ "private", "function", "send_http", "(", "$", "url", ",", "$", "data", ",", "$", "headers", "=", "[", "]", ")", "{", "if", "(", "$", "this", "->", "curl_method", "==", "'async'", ")", "{", "$", "this", "->", "_curl_handler", "->", "enqueue", "(", "...
Send the message over http to the sentry url given @param string $url URL of the Sentry instance to log to @param array $data Associative array of data to log @param array $headers Associative array of headers
[ "Send", "the", "message", "over", "http", "to", "the", "sentry", "url", "given" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L875-L884
42,926
mage2pro/core
Sentry/Client.php
Client.send_http_asynchronous_curl_exec
private function send_http_asynchronous_curl_exec($url, $data, $headers) { exec($this->buildCurlCommand($url, $data, $headers)); return true; // The exec method is just fire and forget, so just assume it always works }
php
private function send_http_asynchronous_curl_exec($url, $data, $headers) { exec($this->buildCurlCommand($url, $data, $headers)); return true; // The exec method is just fire and forget, so just assume it always works }
[ "private", "function", "send_http_asynchronous_curl_exec", "(", "$", "url", ",", "$", "data", ",", "$", "headers", ")", "{", "exec", "(", "$", "this", "->", "buildCurlCommand", "(", "$", "url", ",", "$", "data", ",", "$", "headers", ")", ")", ";", "ret...
Send the cURL to Sentry asynchronously. No errors will be returned from cURL @param string $url URL of the Sentry instance to log to @param array $data Associative array of data to log @param array $headers Associative array of headers @return bool
[ "Send", "the", "cURL", "to", "Sentry", "asynchronously", ".", "No", "errors", "will", "be", "returned", "from", "cURL" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L912-L916
42,927
mage2pro/core
Sentry/Client.php
Client.send_http_synchronous
private function send_http_synchronous($url, $data, $headers) { $new_headers = []; foreach ($headers as $key => $value) { array_push($new_headers, $key .': '. $value); } // XXX(dcramer): Prevent 100-continue response form server (Fixes GH-216) $new_headers[] = 'Expect:'; $curl = curl_init($url); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_HTTPHEADER, $new_headers); curl_setopt($curl, CURLOPT_POSTFIELDS, $data); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $options = $this->get_curl_options(); $ca_cert = $options[CURLOPT_CAINFO]; unset($options[CURLOPT_CAINFO]); curl_setopt_array($curl, $options); curl_exec($curl); $errno = curl_errno($curl); // CURLE_SSL_CACERT || CURLE_SSL_CACERT_BADFILE if ($errno == 60 || $errno == 77) { curl_setopt($curl, CURLOPT_CAINFO, $ca_cert); curl_exec($curl); } $code = curl_getinfo($curl, CURLINFO_HTTP_CODE); $success = ($code == 200); if (!$success) { // It'd be nice just to raise an exception here, but it's not very PHP-like $this->_lasterror = curl_error($curl); } else { $this->_lasterror = null; } curl_close($curl); return $success; }
php
private function send_http_synchronous($url, $data, $headers) { $new_headers = []; foreach ($headers as $key => $value) { array_push($new_headers, $key .': '. $value); } // XXX(dcramer): Prevent 100-continue response form server (Fixes GH-216) $new_headers[] = 'Expect:'; $curl = curl_init($url); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_HTTPHEADER, $new_headers); curl_setopt($curl, CURLOPT_POSTFIELDS, $data); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $options = $this->get_curl_options(); $ca_cert = $options[CURLOPT_CAINFO]; unset($options[CURLOPT_CAINFO]); curl_setopt_array($curl, $options); curl_exec($curl); $errno = curl_errno($curl); // CURLE_SSL_CACERT || CURLE_SSL_CACERT_BADFILE if ($errno == 60 || $errno == 77) { curl_setopt($curl, CURLOPT_CAINFO, $ca_cert); curl_exec($curl); } $code = curl_getinfo($curl, CURLINFO_HTTP_CODE); $success = ($code == 200); if (!$success) { // It'd be nice just to raise an exception here, but it's not very PHP-like $this->_lasterror = curl_error($curl); } else { $this->_lasterror = null; } curl_close($curl); return $success; }
[ "private", "function", "send_http_synchronous", "(", "$", "url", ",", "$", "data", ",", "$", "headers", ")", "{", "$", "new_headers", "=", "[", "]", ";", "foreach", "(", "$", "headers", "as", "$", "key", "=>", "$", "value", ")", "{", "array_push", "(...
Send a blocking cURL to Sentry and check for errors from cURL @param string $url URL of the Sentry instance to log to @param array $data Associative array of data to log @param array $headers Associative array of headers @return bool
[ "Send", "a", "blocking", "cURL", "to", "Sentry", "and", "check", "for", "errors", "from", "cURL" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L926-L966
42,928
mage2pro/core
Sentry/Client.php
Client.get_auth_header
protected function get_auth_header($timestamp, $client, $api_key, $secret_key) { $header = array( sprintf('sentry_timestamp=%F', $timestamp), "sentry_client={$client}", sprintf('sentry_version=%s', self::PROTOCOL), ); if ($api_key) { $header[] = "sentry_key={$api_key}"; } if ($secret_key) { $header[] = "sentry_secret={$secret_key}"; } return sprintf('Sentry %s', implode(', ', $header)); }
php
protected function get_auth_header($timestamp, $client, $api_key, $secret_key) { $header = array( sprintf('sentry_timestamp=%F', $timestamp), "sentry_client={$client}", sprintf('sentry_version=%s', self::PROTOCOL), ); if ($api_key) { $header[] = "sentry_key={$api_key}"; } if ($secret_key) { $header[] = "sentry_secret={$secret_key}"; } return sprintf('Sentry %s', implode(', ', $header)); }
[ "protected", "function", "get_auth_header", "(", "$", "timestamp", ",", "$", "client", ",", "$", "api_key", ",", "$", "secret_key", ")", "{", "$", "header", "=", "array", "(", "sprintf", "(", "'sentry_timestamp=%F'", ",", "$", "timestamp", ")", ",", "\"sen...
Generate a Sentry authorization header string @param string $timestamp Timestamp when the event occurred @param string $client HTTP client name (not Client object) @param string $api_key Sentry API key @param string $secret_key Sentry API key @return string
[ "Generate", "a", "Sentry", "authorization", "header", "string" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L977-L995
42,929
mage2pro/core
Sentry/Client.php
Client.uuid4
private function uuid4() { $uuid = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', // 32 bits for "time_low" mt_rand(0, 0xffff), mt_rand(0, 0xffff), // 16 bits for "time_mid" mt_rand(0, 0xffff), // 16 bits for "time_hi_and_version", // four most significant bits holds version number 4 mt_rand(0, 0x0fff) | 0x4000, // 16 bits, 8 bits for "clk_seq_hi_res", // 8 bits for "clk_seq_low", // two most significant bits holds zero and one for variant DCE1.1 mt_rand(0, 0x3fff) | 0x8000, // 48 bits for "node" mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) ); return str_replace('-', '', $uuid); }
php
private function uuid4() { $uuid = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', // 32 bits for "time_low" mt_rand(0, 0xffff), mt_rand(0, 0xffff), // 16 bits for "time_mid" mt_rand(0, 0xffff), // 16 bits for "time_hi_and_version", // four most significant bits holds version number 4 mt_rand(0, 0x0fff) | 0x4000, // 16 bits, 8 bits for "clk_seq_hi_res", // 8 bits for "clk_seq_low", // two most significant bits holds zero and one for variant DCE1.1 mt_rand(0, 0x3fff) | 0x8000, // 48 bits for "node" mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) ); return str_replace('-', '', $uuid); }
[ "private", "function", "uuid4", "(", ")", "{", "$", "uuid", "=", "sprintf", "(", "'%04x%04x-%04x-%04x-%04x-%04x%04x%04x'", ",", "// 32 bits for \"time_low\"", "mt_rand", "(", "0", ",", "0xffff", ")", ",", "mt_rand", "(", "0", ",", "0xffff", ")", ",", "// 16 bi...
Generate an uuid4 value @return string
[ "Generate", "an", "uuid4", "value" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L1008-L1031
42,930
mage2pro/core
Sentry/Client.php
Client.get_current_url
protected function get_current_url() { // When running from commandline the REQUEST_URI is missing. if (!isset($_SERVER['REQUEST_URI'])) { return null; } // HTTP_HOST is a client-supplied header that is optional in HTTP 1.0 $host = (!empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : (!empty($_SERVER['LOCAL_ADDR']) ? $_SERVER['LOCAL_ADDR'] : (!empty($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : ''))); $httpS = $this->isHttps() ? 's' : ''; return "http{$httpS}://{$host}{$_SERVER['REQUEST_URI']}"; }
php
protected function get_current_url() { // When running from commandline the REQUEST_URI is missing. if (!isset($_SERVER['REQUEST_URI'])) { return null; } // HTTP_HOST is a client-supplied header that is optional in HTTP 1.0 $host = (!empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : (!empty($_SERVER['LOCAL_ADDR']) ? $_SERVER['LOCAL_ADDR'] : (!empty($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : ''))); $httpS = $this->isHttps() ? 's' : ''; return "http{$httpS}://{$host}{$_SERVER['REQUEST_URI']}"; }
[ "protected", "function", "get_current_url", "(", ")", "{", "// When running from commandline the REQUEST_URI is missing.", "if", "(", "!", "isset", "(", "$", "_SERVER", "[", "'REQUEST_URI'", "]", ")", ")", "{", "return", "null", ";", "}", "// HTTP_HOST is a client-sup...
Return the URL for the current request @return string|null
[ "Return", "the", "URL", "for", "the", "current", "request" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L1038-L1052
42,931
mage2pro/core
Sentry/Client.php
Client.isHttps
protected function isHttps() { if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') { return true; } if (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) { return true; } if (!empty($this->trust_x_forwarded_proto) && !empty($_SERVER['X-FORWARDED-PROTO']) && $_SERVER['X-FORWARDED-PROTO'] === 'https') { return true; } return false; }
php
protected function isHttps() { if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') { return true; } if (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) { return true; } if (!empty($this->trust_x_forwarded_proto) && !empty($_SERVER['X-FORWARDED-PROTO']) && $_SERVER['X-FORWARDED-PROTO'] === 'https') { return true; } return false; }
[ "protected", "function", "isHttps", "(", ")", "{", "if", "(", "!", "empty", "(", "$", "_SERVER", "[", "'HTTPS'", "]", ")", "&&", "$", "_SERVER", "[", "'HTTPS'", "]", "!==", "'off'", ")", "{", "return", "true", ";", "}", "if", "(", "!", "empty", "...
Was the current request made over https? @return bool
[ "Was", "the", "current", "request", "made", "over", "https?" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L1059-L1076
42,932
mage2pro/core
Sentry/Client.php
Client.translateSeverity
function translateSeverity($severity) { if (is_array($this->severity_map) && isset($this->severity_map[$severity])) { return $this->severity_map[$severity]; } switch ($severity) { case E_ERROR: return Client::ERROR; case E_WARNING: return Client::WARN; case E_PARSE: return Client::ERROR; case E_NOTICE: return Client::INFO; case E_CORE_ERROR: return Client::ERROR; case E_CORE_WARNING: return Client::WARN; case E_COMPILE_ERROR: return Client::ERROR; case E_COMPILE_WARNING: return Client::WARN; case E_USER_ERROR: return Client::ERROR; case E_USER_WARNING: return Client::WARN; case E_USER_NOTICE: return Client::INFO; case E_STRICT: return Client::INFO; case E_RECOVERABLE_ERROR: return Client::ERROR; } if (version_compare(PHP_VERSION, '5.3.0', '>=')) { switch ($severity) { case E_DEPRECATED: return Client::WARN; case E_USER_DEPRECATED: return Client::WARN; } } return Client::ERROR; }
php
function translateSeverity($severity) { if (is_array($this->severity_map) && isset($this->severity_map[$severity])) { return $this->severity_map[$severity]; } switch ($severity) { case E_ERROR: return Client::ERROR; case E_WARNING: return Client::WARN; case E_PARSE: return Client::ERROR; case E_NOTICE: return Client::INFO; case E_CORE_ERROR: return Client::ERROR; case E_CORE_WARNING: return Client::WARN; case E_COMPILE_ERROR: return Client::ERROR; case E_COMPILE_WARNING: return Client::WARN; case E_USER_ERROR: return Client::ERROR; case E_USER_WARNING: return Client::WARN; case E_USER_NOTICE: return Client::INFO; case E_STRICT: return Client::INFO; case E_RECOVERABLE_ERROR: return Client::ERROR; } if (version_compare(PHP_VERSION, '5.3.0', '>=')) { switch ($severity) { case E_DEPRECATED: return Client::WARN; case E_USER_DEPRECATED: return Client::WARN; } } return Client::ERROR; }
[ "function", "translateSeverity", "(", "$", "severity", ")", "{", "if", "(", "is_array", "(", "$", "this", "->", "severity_map", ")", "&&", "isset", "(", "$", "this", "->", "severity_map", "[", "$", "severity", "]", ")", ")", "{", "return", "$", "this",...
Translate a PHP Error constant into a Sentry log level group @param string $severity PHP E_$x error constant @return string Sentry log level group
[ "Translate", "a", "PHP", "Error", "constant", "into", "a", "Sentry", "log", "level", "group" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L1099-L1126
42,933
mage2pro/core
Sentry/Client.php
Client.set_user_data
function set_user_data($id, $email=null, $data=[]) { $user = array('id' => $id); if (isset($email)) { $user['email'] = $email; } $this->user_context(array_merge($user, $data)); }
php
function set_user_data($id, $email=null, $data=[]) { $user = array('id' => $id); if (isset($email)) { $user['email'] = $email; } $this->user_context(array_merge($user, $data)); }
[ "function", "set_user_data", "(", "$", "id", ",", "$", "email", "=", "null", ",", "$", "data", "=", "[", "]", ")", "{", "$", "user", "=", "array", "(", "'id'", "=>", "$", "id", ")", ";", "if", "(", "isset", "(", "$", "email", ")", ")", "{", ...
Convenience function for setting a user's ID and Email @deprecated @param string $id User's ID @param string|null $email User's email @param array $data Additional user data
[ "Convenience", "function", "for", "setting", "a", "user", "s", "ID", "and", "Email" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L1147-L1154
42,934
mage2pro/core
Sentry/Client.php
Client.user_context
function user_context($data, $merge=true) { if ($merge && $this->context->user !== null) { // bail if data is null if (!$data) { return; } $this->context->user = array_merge($this->context->user, $data); } else { $this->context->user = $data; } }
php
function user_context($data, $merge=true) { if ($merge && $this->context->user !== null) { // bail if data is null if (!$data) { return; } $this->context->user = array_merge($this->context->user, $data); } else { $this->context->user = $data; } }
[ "function", "user_context", "(", "$", "data", ",", "$", "merge", "=", "true", ")", "{", "if", "(", "$", "merge", "&&", "$", "this", "->", "context", "->", "user", "!==", "null", ")", "{", "// bail if data is null", "if", "(", "!", "$", "data", ")", ...
Sets user context. @param array $data Associative array of user data @param bool $merge Merge existing context with new context
[ "Sets", "user", "context", "." ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L1173-L1184
42,935
mage2pro/core
Sentry/Client.php
Client.needSkipFrame
private static function needSkipFrame(array $frame) {return \Magento\Framework\App\ErrorHandler::class === dfa($frame, 'class') || df_ends_with(df_path_n(dfa($frame, 'file')), 'Sentry/Breadcrumbs/ErrorHandler.php') ;}
php
private static function needSkipFrame(array $frame) {return \Magento\Framework\App\ErrorHandler::class === dfa($frame, 'class') || df_ends_with(df_path_n(dfa($frame, 'file')), 'Sentry/Breadcrumbs/ErrorHandler.php') ;}
[ "private", "static", "function", "needSkipFrame", "(", "array", "$", "frame", ")", "{", "return", "\\", "Magento", "\\", "Framework", "\\", "App", "\\", "ErrorHandler", "::", "class", "===", "dfa", "(", "$", "frame", ",", "'class'", ")", "||", "df_ends_wit...
2016-12-23 @param array(string => string|int|array) $frame @return bool
[ "2016", "-", "12", "-", "23" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Client.php#L1221-L1224
42,936
mage2pro/core
Core/R/ConT.php
ConT.p
static function p($allowAbstract, \Closure $f) { /** @var bool $prev */ $prev = self::$allow_abstract; self::$allow_abstract = $allowAbstract; try {return $f();} finally {self::$allow_abstract = $prev;} }
php
static function p($allowAbstract, \Closure $f) { /** @var bool $prev */ $prev = self::$allow_abstract; self::$allow_abstract = $allowAbstract; try {return $f();} finally {self::$allow_abstract = $prev;} }
[ "static", "function", "p", "(", "$", "allowAbstract", ",", "\\", "Closure", "$", "f", ")", "{", "/** @var bool $prev */", "$", "prev", "=", "self", "::", "$", "allow_abstract", ";", "self", "::", "$", "allow_abstract", "=", "$", "allowAbstract", ";", "try"...
2017-04-01 @used-by dfpm_c() @used-by dfsm_c() @param bool $allowAbstract @param \Closure $f @return mixed
[ "2017", "-", "04", "-", "01" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Core/R/ConT.php#L13-L19
42,937
mage2pro/core
Backend/Model/Auth.php
Auth.loginByEmail
function loginByEmail($email) { $this->_initCredentialStorage(); /** @var \Magento\Backend\Model\Auth\Credential\StorageInterface|\Magento\User\Model\User $user */ $user = $this->getCredentialStorage(); $user->{\Df\User\Plugin\Model\User::LOGIN_BY_EMAIL} = true; $user->login($email, null); if ($user->getId()) { /** @var IStorage|\Magento\Backend\Model\Auth\Session $authSession */ $authSession = $this->getAuthStorage(); $authSession->setUser($user); $authSession->processLogin(); //$cookieManager->setSensitiveCookie($session->getName(), session_id()); $_COOKIE[$authSession->getName()] = session_id(); df_session_manager()->setData(\Magento\Framework\Data\Form\FormKey::FORM_KEY, df_request('form_key')); df_dispatch('backend_auth_user_login_success', ['user' => $user]); // 2016-04-10 // Обязательно, иначе авторизация работать не будет. // https://mage2.pro/t/1199 /** @var SecurityPlugin $securityPlugin */ $securityPlugin = df_o(SecurityPlugin::class); $securityPlugin->afterLogin($this); } }
php
function loginByEmail($email) { $this->_initCredentialStorage(); /** @var \Magento\Backend\Model\Auth\Credential\StorageInterface|\Magento\User\Model\User $user */ $user = $this->getCredentialStorage(); $user->{\Df\User\Plugin\Model\User::LOGIN_BY_EMAIL} = true; $user->login($email, null); if ($user->getId()) { /** @var IStorage|\Magento\Backend\Model\Auth\Session $authSession */ $authSession = $this->getAuthStorage(); $authSession->setUser($user); $authSession->processLogin(); //$cookieManager->setSensitiveCookie($session->getName(), session_id()); $_COOKIE[$authSession->getName()] = session_id(); df_session_manager()->setData(\Magento\Framework\Data\Form\FormKey::FORM_KEY, df_request('form_key')); df_dispatch('backend_auth_user_login_success', ['user' => $user]); // 2016-04-10 // Обязательно, иначе авторизация работать не будет. // https://mage2.pro/t/1199 /** @var SecurityPlugin $securityPlugin */ $securityPlugin = df_o(SecurityPlugin::class); $securityPlugin->afterLogin($this); } }
[ "function", "loginByEmail", "(", "$", "email", ")", "{", "$", "this", "->", "_initCredentialStorage", "(", ")", ";", "/** @var \\Magento\\Backend\\Model\\Auth\\Credential\\StorageInterface|\\Magento\\User\\Model\\User $user */", "$", "user", "=", "$", "this", "->", "getCred...
2016-04-10 It is implemented by analogy with @see \Magento\Backend\Model\Auth::login() https://github.com/magento/magento2/blob/052e789/app/code/Magento/Backend/Model/Auth.php#L137-L182 @param string $email @throws \Magento\Framework\Exception\AuthenticationException
[ "2016", "-", "04", "-", "10", "It", "is", "implemented", "by", "analogy", "with" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Backend/Model/Auth.php#L14-L36
42,938
mage2pro/core
Shipping/Plugin/Model/CarrierFactoryT.php
CarrierFactoryT.aroundCreate
function aroundCreate(Sb $sb, \Closure $f, $c, $sid = null) { /** @var $r */ if (!is_a($c, M::class, true)) { $r = $f($c, $sid); } else { $r = M::sg($c); $r->setId($c); $r->setStore($sid); } return $r; }
php
function aroundCreate(Sb $sb, \Closure $f, $c, $sid = null) { /** @var $r */ if (!is_a($c, M::class, true)) { $r = $f($c, $sid); } else { $r = M::sg($c); $r->setId($c); $r->setStore($sid); } return $r; }
[ "function", "aroundCreate", "(", "Sb", "$", "sb", ",", "\\", "Closure", "$", "f", ",", "$", "c", ",", "$", "sid", "=", "null", ")", "{", "/** @var $r */", "if", "(", "!", "is_a", "(", "$", "c", ",", "M", "::", "class", ",", "true", ")", ")", ...
2018-04-21 It forces the @see \Df\Shipping\Method descendants to be singletons: @see \Magento\Shipping\Model\CarrierFactory::create() https://github.com/magento/magento2/blob/2.2.3/app/code/Magento/Shipping/Model/CarrierFactory.php#L57-L80 @param Sb $sb @param \Closure $f @param string $c @param int|null $sid [optional] @return M|IM
[ "2018", "-", "04", "-", "21", "It", "forces", "the" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Shipping/Plugin/Model/CarrierFactoryT.php#L19-L30
42,939
mage2pro/core
Sso/FE/CustomerReturn.php
CustomerReturn.url
final protected function url() { $isBackend = df_fe_fc_b($this, 'dfWebhook_backend'); /** @var bool $isBackend */ $route = df_route($this->m(), df_fe_fc($this, 'dfWebhook_suffix'), $isBackend); /** @var string $route */ return $isBackend ? df_url_backend_ns($route) : df_url_frontend($route); }
php
final protected function url() { $isBackend = df_fe_fc_b($this, 'dfWebhook_backend'); /** @var bool $isBackend */ $route = df_route($this->m(), df_fe_fc($this, 'dfWebhook_suffix'), $isBackend); /** @var string $route */ return $isBackend ? df_url_backend_ns($route) : df_url_frontend($route); }
[ "final", "protected", "function", "url", "(", ")", "{", "$", "isBackend", "=", "df_fe_fc_b", "(", "$", "this", ",", "'dfWebhook_backend'", ")", ";", "/** @var bool $isBackend */", "$", "route", "=", "df_route", "(", "$", "this", "->", "m", "(", ")", ",", ...
2017-04-23 @see https://github.com/mage2pro/dynamics365/blob/0.0.4/etc/adminhtml/system.xml#L57 @override @see \Df\Framework\Form\Element\Url::url() @used-by \Df\Framework\Form\Element\Url::messageForOthers() @return string
[ "2017", "-", "04", "-", "23" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sso/FE/CustomerReturn.php#L28-L32
42,940
mage2pro/core
OAuth/ReturnT.php
ReturnT.redirectUrl
protected function redirectUrl() {return df_starts_with($r = df_request($this->redirectUrlKey()) ?: df_url(), 'http') ? $r : base64_decode($r) ;}
php
protected function redirectUrl() {return df_starts_with($r = df_request($this->redirectUrlKey()) ?: df_url(), 'http') ? $r : base64_decode($r) ;}
[ "protected", "function", "redirectUrl", "(", ")", "{", "return", "df_starts_with", "(", "$", "r", "=", "df_request", "(", "$", "this", "->", "redirectUrlKey", "(", ")", ")", "?", ":", "df_url", "(", ")", ",", "'http'", ")", "?", "$", "r", ":", "base6...
2016-06-05 @see urldecode() здесь вызывать уже не надо, проверял. 2016-12-02 Если адрес для перенаправления покупателя передётся в адресе возврата, то адрес для перенаправления там може быть закодирован посредством @see base64_encode() @see \Dfe\BlackbaudNetCommunity\Url::get() @used-by execute() @used-by \Df\Sso\CustomerReturn::redirectUrl() @see \Df\OAuth\ReturnT\GeneralPurpose::redirectUrl() @see \Df\Sso\CustomerReturn::redirectUrl() @return string
[ "2016", "-", "06", "-", "05" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/OAuth/ReturnT.php#L53-L56
42,941
mage2pro/core
Payment/Plugin/Model/Checks/CanUseForCountry.php
CanUseForCountry.aroundIsApplicable
function aroundIsApplicable(Sb $sb, \Closure $f, IM $m, Q $q) {return !dfp_my($m) ? $f($m, $q) : ( $m->canUseForCountry(df_oq_country_sb($q)) );}
php
function aroundIsApplicable(Sb $sb, \Closure $f, IM $m, Q $q) {return !dfp_my($m) ? $f($m, $q) : ( $m->canUseForCountry(df_oq_country_sb($q)) );}
[ "function", "aroundIsApplicable", "(", "Sb", "$", "sb", ",", "\\", "Closure", "$", "f", ",", "IM", "$", "m", ",", "Q", "$", "q", ")", "{", "return", "!", "dfp_my", "(", "$", "m", ")", "?", "$", "f", "(", "$", "m", ",", "$", "q", ")", ":", ...
2017-12-13 "Improve @see \Magento\Payment\Model\Checks\CanUseForCountry: it should give priority to the shipping country over the billing country for my modules": https://github.com/mage2pro/core/issues/62 @see \Magento\Payment\Model\Checks\CanUseForCountry::isApplicable() https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Payment/Model/Checks/CanUseForCountry.php#L27-L36 https://github.com/magento/magento2/blob/2.2.2/app/code/Magento/Payment/Model/Checks/CanUseForCountry.php#L33-L42 @used-by \Df\Payment\Settings::applicableForQuoteByCountry() @param Sb $sb @param \Closure $f @param IM $m @param Q $q @return string
[ "2017", "-", "12", "-", "13", "Improve" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Plugin/Model/Checks/CanUseForCountry.php#L23-L25
42,942
mage2pro/core
Payment/ConfigProvider.php
ConfigProvider.config
protected function config() { $s = $this->s(); /** @var S $s */ $currency = $this->currency(); /** @var Currency $currency */ $currencyC = $currency->iso3(); /** @var string $currencyC */ return [ /** * 2017-11-05 * @todo «Passing `amountF` to the client side is incorrect, * because a payment's amount could be changed client-side * (e.g., after a discount code application)» * https://github.com/mage2pro/core/issues/45 */ 'amountF' => $this->m()->amountFormat($this->amount()) ,'requireBillingAddress' => $s->requireBillingAddress() ,'isTest' => $s->test() // 2017-02-07 // https://github.com/mage2pro/core/blob/1.12.7/Payment/view/frontend/web/mixin.js?ts=4#L249-L258 ,'paymentCurrency' => [ // 2016-09-06 // Код платёжной валюты. // Это значение индивидуально для каждого платёжного модуля. // 2017-02-07 // https://github.com/mage2pro/2checkout/blob/1.1.18/view/frontend/web/main.js?ts=4#L23 // https://github.com/mage2pro/paymill/blob/0.1.2/view/frontend/web/main.js?ts=4#L46 'code' => $currencyC // 2016-09-06 // Правила форматирования платёжной валюты. // How to get the display format for a particular currency and locale programmatically? // https://mage2.pro/t/2022 // 2017-02-07 // https://github.com/mage2pro/core/blob/1.12.9/Payment/view/frontend/web/mixin.js?ts=4#L205 ,'format' => df_locale_f()->getPriceFormat($locale = null, $currencyC) // 2017-02-07 // https://github.com/checkout/checkout-magento2-plugin/blob/1.1.21/view/frontend/web/main.js?ts=4#L27 // https://github.com/mage2pro/2checkout/blob/1.1.18/view/frontend/web/main.js?ts=4#L26 // https://github.com/mage2pro/securepay/blob/1.1.19/view/frontend/web/main.js?ts=4#L37 // https://github.com/mage2pro/securepay/blob/1.1.19/view/frontend/web/main.js?ts=4#L51 ,'name' => df_currency_name($currencyC) // 2016-09-06 // Курс обмена учётной валюты на платёжную. // Это значение индивидуально для каждого платёжного модуля. // 2017-02-07 // https://github.com/mage2pro/core/blob/1.12.7/Payment/view/frontend/web/mixin.js?ts=4#L60 ,'rate' => $currency->rateToPayment() ] ,'titleBackend' => $this->m()->titleB() ] ;}
php
protected function config() { $s = $this->s(); /** @var S $s */ $currency = $this->currency(); /** @var Currency $currency */ $currencyC = $currency->iso3(); /** @var string $currencyC */ return [ /** * 2017-11-05 * @todo «Passing `amountF` to the client side is incorrect, * because a payment's amount could be changed client-side * (e.g., after a discount code application)» * https://github.com/mage2pro/core/issues/45 */ 'amountF' => $this->m()->amountFormat($this->amount()) ,'requireBillingAddress' => $s->requireBillingAddress() ,'isTest' => $s->test() // 2017-02-07 // https://github.com/mage2pro/core/blob/1.12.7/Payment/view/frontend/web/mixin.js?ts=4#L249-L258 ,'paymentCurrency' => [ // 2016-09-06 // Код платёжной валюты. // Это значение индивидуально для каждого платёжного модуля. // 2017-02-07 // https://github.com/mage2pro/2checkout/blob/1.1.18/view/frontend/web/main.js?ts=4#L23 // https://github.com/mage2pro/paymill/blob/0.1.2/view/frontend/web/main.js?ts=4#L46 'code' => $currencyC // 2016-09-06 // Правила форматирования платёжной валюты. // How to get the display format for a particular currency and locale programmatically? // https://mage2.pro/t/2022 // 2017-02-07 // https://github.com/mage2pro/core/blob/1.12.9/Payment/view/frontend/web/mixin.js?ts=4#L205 ,'format' => df_locale_f()->getPriceFormat($locale = null, $currencyC) // 2017-02-07 // https://github.com/checkout/checkout-magento2-plugin/blob/1.1.21/view/frontend/web/main.js?ts=4#L27 // https://github.com/mage2pro/2checkout/blob/1.1.18/view/frontend/web/main.js?ts=4#L26 // https://github.com/mage2pro/securepay/blob/1.1.19/view/frontend/web/main.js?ts=4#L37 // https://github.com/mage2pro/securepay/blob/1.1.19/view/frontend/web/main.js?ts=4#L51 ,'name' => df_currency_name($currencyC) // 2016-09-06 // Курс обмена учётной валюты на платёжную. // Это значение индивидуально для каждого платёжного модуля. // 2017-02-07 // https://github.com/mage2pro/core/blob/1.12.7/Payment/view/frontend/web/mixin.js?ts=4#L60 ,'rate' => $currency->rateToPayment() ] ,'titleBackend' => $this->m()->titleB() ] ;}
[ "protected", "function", "config", "(", ")", "{", "$", "s", "=", "$", "this", "->", "s", "(", ")", ";", "/** @var S $s */", "$", "currency", "=", "$", "this", "->", "currency", "(", ")", ";", "/** @var Currency $currency */", "$", "currencyC", "=", "$", ...
2016-08-04 @used-by \Df\Payment\ConfigProvider::getConfig() @see \Df\Payment\ConfigProvider\BankCard::config() @see \Dfe\AllPay\ConfigProvider::config() @see \Dfe\AlphaCommerceHub\ConfigProvider::config() @see \Dfe\IPay88\ConfigProvider::config() @see \Dfe\Robokassa\ConfigProvider::config() @see \Dfe\TBCBank\ConfigProvider::config() @see \Dfe\YandexKassa\ConfigProvider::config() @return array(string => mixed)
[ "2016", "-", "08", "-", "04" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/ConfigProvider.php#L115-L162
42,943
mage2pro/core
Payment/ConfigProvider.php
ConfigProvider.configOptions
final protected static function configOptions(IOptions $o) {$s = $o->s(); /** @var Settings $s */ return [ // 2017-09-19 «Where to ask for a payment option?» 'needShowOptions' => Options::needShow($s) /** * 2017-09-18 * @used-by Df_Payments/withOptions::options() * https://github.com/mage2pro/core/blob/2.12.5/Payment/view/frontend/web/withOptions.js#L72-L80 * 2017-10-29 * Note 1. * «JavaScript does not guarantee the properties order in objects, * so \Df\Payment\ConfigProvider::configOptions() should * specify the payment options orderings exactly in a separate property, * or pass the options to the client side as an array instead of an object»: * https://github.com/mage2pro/core/issues/41 * Note 2. * It is important to use @uses array_values() * for the result to be interpreted as an array? not object, on the client side. */ ,'options' => !df_is_assoc($oo = $o->options()) ? $oo : /** * */ array_values(df_map_k($oo, function($v, $l) {return ['label' => $l, 'value' => $v];})) // 2017-09-19 A text to be shown on the Magento checkout page instead of the payment options dialog. ,'optionsDescription' => $s->v('optionsDescription') /** * 2017-09-21 * «Payment options display mode» (`images` or `text`). * *) iPay88: https://github.com/mage2pro/ipay88/blob/1.3.3/etc/adminhtml/system.xml#L151-L164 * *) Robokassa: https://github.com/mage2pro/robokassa/blob/1.2.4/etc/adminhtml/system.xml#L230-L243 * *) Yandex.Kassa: https://github.com/mage2pro/yandex-kassa/blob/0.1.5/etc/adminhtml/system.xml#L178-L192 */ ,'optionsDisplayMode' => $s->v('optionsDisplayMode', null, DisplayMode::IMAGES) // 2017-09-19 A text above the payment options on the Magento checkout page. ,'optionsPrompt' => $s->v('optionsPrompt') ];}
php
final protected static function configOptions(IOptions $o) {$s = $o->s(); /** @var Settings $s */ return [ // 2017-09-19 «Where to ask for a payment option?» 'needShowOptions' => Options::needShow($s) /** * 2017-09-18 * @used-by Df_Payments/withOptions::options() * https://github.com/mage2pro/core/blob/2.12.5/Payment/view/frontend/web/withOptions.js#L72-L80 * 2017-10-29 * Note 1. * «JavaScript does not guarantee the properties order in objects, * so \Df\Payment\ConfigProvider::configOptions() should * specify the payment options orderings exactly in a separate property, * or pass the options to the client side as an array instead of an object»: * https://github.com/mage2pro/core/issues/41 * Note 2. * It is important to use @uses array_values() * for the result to be interpreted as an array? not object, on the client side. */ ,'options' => !df_is_assoc($oo = $o->options()) ? $oo : /** * */ array_values(df_map_k($oo, function($v, $l) {return ['label' => $l, 'value' => $v];})) // 2017-09-19 A text to be shown on the Magento checkout page instead of the payment options dialog. ,'optionsDescription' => $s->v('optionsDescription') /** * 2017-09-21 * «Payment options display mode» (`images` or `text`). * *) iPay88: https://github.com/mage2pro/ipay88/blob/1.3.3/etc/adminhtml/system.xml#L151-L164 * *) Robokassa: https://github.com/mage2pro/robokassa/blob/1.2.4/etc/adminhtml/system.xml#L230-L243 * *) Yandex.Kassa: https://github.com/mage2pro/yandex-kassa/blob/0.1.5/etc/adminhtml/system.xml#L178-L192 */ ,'optionsDisplayMode' => $s->v('optionsDisplayMode', null, DisplayMode::IMAGES) // 2017-09-19 A text above the payment options on the Magento checkout page. ,'optionsPrompt' => $s->v('optionsPrompt') ];}
[ "final", "protected", "static", "function", "configOptions", "(", "IOptions", "$", "o", ")", "{", "$", "s", "=", "$", "o", "->", "s", "(", ")", ";", "/** @var Settings $s */", "return", "[", "// 2017-09-19 «Where to ask for a payment option?»", "'needShowOptions'", ...
2017-09-18 @used-by \Df\GingerPaymentsBase\ConfigProvider::config() @used-by \Dfe\IPay88\ConfigProvider::config() @used-by \Dfe\Robokassa\ConfigProvider::config() @used-by \Dfe\YandexKassa\ConfigProvider::config() @param IOptions $o @return array(string => mixed)
[ "2017", "-", "09", "-", "18" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/ConfigProvider.php#L214-L248
42,944
mage2pro/core
Sso/Upgrade/Data.php
Data.attribute
final protected function attribute($name, $label) { static $ordering = 1000; /** @var int $ordering */ df_eav_setup()->addAttribute('customer', $name, [ 'input' => 'text' ,'label' => "{$this->labelPrefix()} $label" ,'position' => $ordering++ ,'required' => false ,'sort_order' => $ordering ,'system' => false ,'type' => 'static' ,'visible' => false ]); /** @var int $attributeId */ $attributeId = df_first(df_fetch_col('eav_attribute', 'attribute_id', 'attribute_code', $name)); df_conn()->insert(df_table('customer_form_attribute'), [ 'attribute_id' => $attributeId, 'form_code' => 'adminhtml_customer' ]); }
php
final protected function attribute($name, $label) { static $ordering = 1000; /** @var int $ordering */ df_eav_setup()->addAttribute('customer', $name, [ 'input' => 'text' ,'label' => "{$this->labelPrefix()} $label" ,'position' => $ordering++ ,'required' => false ,'sort_order' => $ordering ,'system' => false ,'type' => 'static' ,'visible' => false ]); /** @var int $attributeId */ $attributeId = df_first(df_fetch_col('eav_attribute', 'attribute_id', 'attribute_code', $name)); df_conn()->insert(df_table('customer_form_attribute'), [ 'attribute_id' => $attributeId, 'form_code' => 'adminhtml_customer' ]); }
[ "final", "protected", "function", "attribute", "(", "$", "name", ",", "$", "label", ")", "{", "static", "$", "ordering", "=", "1000", ";", "/** @var int $ordering */", "df_eav_setup", "(", ")", "->", "addAttribute", "(", "'customer'", ",", "$", "name", ",", ...
2015-10-10 @used-by _process() @used-by \Dfe\FacebookLogin\Setup\UpgradeData::_process() @param string $name @param string $label
[ "2015", "-", "10", "-", "10" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sso/Upgrade/Data.php#L40-L57
42,945
mage2pro/core
Framework/App/Action/Image.php
Image.execute
function execute() { /** * 2015-11-29 * @see \Magento\Framework\App\Response\Http::setNoCacheHeaders() * https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/App/Response/Http.php#L133-L138 */ df_response_code(200); df_response_content_type("image/{$this->type()}"); df_response_cache_max(); $c = $this->contents(); /** @var string $c */ df_response_headers(['Content-Length' => strlen($c), 'Content-Transfer-Encoding' => 'binary']); $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); df_response()->setBody($c); }
php
function execute() { /** * 2015-11-29 * @see \Magento\Framework\App\Response\Http::setNoCacheHeaders() * https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/App/Response/Http.php#L133-L138 */ df_response_code(200); df_response_content_type("image/{$this->type()}"); df_response_cache_max(); $c = $this->contents(); /** @var string $c */ df_response_headers(['Content-Length' => strlen($c), 'Content-Transfer-Encoding' => 'binary']); $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); df_response()->setBody($c); }
[ "function", "execute", "(", ")", "{", "/**\n\t\t * 2015-11-29\n\t\t * @see \\Magento\\Framework\\App\\Response\\Http::setNoCacheHeaders()\n\t\t * https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/App/Response/Http.php#L133-L138\n\t\t */", "df_response_code", "(", "200", ...
2015-11-29 @override @see \Magento\Framework\App\Action\Action::execute() @used-by \Magento\Framework\App\Action\Action::dispatch(): $result = $this->execute(); https://github.com/magento/magento2/blob/2.2.1/lib/internal/Magento/Framework/App/Action/Action.php#L84-L125
[ "2015", "-", "11", "-", "29" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/App/Action/Image.php#L31-L44
42,946
mage2pro/core
Core/State.php
State.blockSet
function blockSet(BlockInterface $block, $templateFile) { $this->_blockStack[]= $block; $this->_templateFileStack[]= $templateFile; }
php
function blockSet(BlockInterface $block, $templateFile) { $this->_blockStack[]= $block; $this->_templateFileStack[]= $templateFile; }
[ "function", "blockSet", "(", "BlockInterface", "$", "block", ",", "$", "templateFile", ")", "{", "$", "this", "->", "_blockStack", "[", "]", "=", "$", "block", ";", "$", "this", "->", "_templateFileStack", "[", "]", "=", "$", "templateFile", ";", "}" ]
2015-08-13 @used-by \Df\Framework\Plugin\View\TemplateEngineInterface::aroundRender() @param BlockInterface|null $block @param string|null $templateFile
[ "2015", "-", "08", "-", "13" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Core/State.php#L51-L54
42,947
mage2pro/core
Core/State.php
State.renderingTitle
function renderingTitle($state = null) { if (!is_null($state)) { $this->_renderingTitle = $state; } return $this->_renderingTitle; }
php
function renderingTitle($state = null) { if (!is_null($state)) { $this->_renderingTitle = $state; } return $this->_renderingTitle; }
[ "function", "renderingTitle", "(", "$", "state", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "state", ")", ")", "{", "$", "this", "->", "_renderingTitle", "=", "$", "state", ";", "}", "return", "$", "this", "->", "_renderingTitle", ";...
2015-09-27 @used-by \Df\Framework\Plugin\View\Page\Title::aroundGet() @used-by \Dfr\Core\Realtime\Dictionary::handleForController() @param bool|null $state [optional] @return bool
[ "2015", "-", "09", "-", "27" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Core/State.php#L131-L136
42,948
mage2pro/core
Framework/Upgrade/Data.php
Data.attributeCA
final protected function attributeCA($name, $label, $ordering = 1000) { $asId = df_eav_ca()->getDefaultAttributeSetId(); /** @var int $asId */ $as = df_new_om(_AS::class); /** @var _AS $as */ df_eav_setup()->addAttribute(IAddressMetadata::ENTITY_TYPE_ADDRESS, $name, [ 'input' => 'text' ,'label' => $label ,'position' => $ordering++ ,'required' => false ,'sort_order' => $ordering ,'system' => false /** * 2019-03-06 * `varchar` (a solution without @see \Verdepieno\Core\Setup\UpgradeSchema ) * does not work for me. * I guess it is a bug in the Magento 2 Community core. */ ,'type' => 'static' ,'visible' => true ]); $a = df_eav_config()->getAttribute(IAddressMetadata::ENTITY_TYPE_ADDRESS, $name); /** @var A $a */ $a->addData([ IGroup::ATTRIBUTE_SET_ID => $asId ,'attribute_group_id' => $as->getDefaultGroupId($asId) ,'used_in_forms' => [ 'adminhtml_customer_address' ,'customer_address_edit' ,'customer_register_address' ,'customer_address' ] ]); $a->save(); }
php
final protected function attributeCA($name, $label, $ordering = 1000) { $asId = df_eav_ca()->getDefaultAttributeSetId(); /** @var int $asId */ $as = df_new_om(_AS::class); /** @var _AS $as */ df_eav_setup()->addAttribute(IAddressMetadata::ENTITY_TYPE_ADDRESS, $name, [ 'input' => 'text' ,'label' => $label ,'position' => $ordering++ ,'required' => false ,'sort_order' => $ordering ,'system' => false /** * 2019-03-06 * `varchar` (a solution without @see \Verdepieno\Core\Setup\UpgradeSchema ) * does not work for me. * I guess it is a bug in the Magento 2 Community core. */ ,'type' => 'static' ,'visible' => true ]); $a = df_eav_config()->getAttribute(IAddressMetadata::ENTITY_TYPE_ADDRESS, $name); /** @var A $a */ $a->addData([ IGroup::ATTRIBUTE_SET_ID => $asId ,'attribute_group_id' => $as->getDefaultGroupId($asId) ,'used_in_forms' => [ 'adminhtml_customer_address' ,'customer_address_edit' ,'customer_register_address' ,'customer_address' ] ]); $a->save(); }
[ "final", "protected", "function", "attributeCA", "(", "$", "name", ",", "$", "label", ",", "$", "ordering", "=", "1000", ")", "{", "$", "asId", "=", "df_eav_ca", "(", ")", "->", "getDefaultAttributeSetId", "(", ")", ";", "/** @var int $asId */", "$", "as",...
2019-03-05 @see \Df\Sso\Upgrade\Data::attribute() @used-by \Verdepieno\Core\Setup\UpgradeData::_process() @param string $name @param string $label @param int $ordering [optional]
[ "2019", "-", "03", "-", "05" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Upgrade/Data.php#L74-L105
42,949
mage2pro/core
Framework/Form/Element/Fieldset.php
Fieldset.checkbox
protected function checkbox($name, $label = null, $value = null, $note = null) { $data = is_array($value) ? $value + ['note' => $note] : ( is_bool($value) ? ['checked' => $value, 'note' => $note] : ['note' => $value] ); return $this->field($name, Checkbox::class, $label, [ 'checked' => Checkbox::b($this->v($name), df_bool(dfa($data, 'checked'))) ] + $data); }
php
protected function checkbox($name, $label = null, $value = null, $note = null) { $data = is_array($value) ? $value + ['note' => $note] : ( is_bool($value) ? ['checked' => $value, 'note' => $note] : ['note' => $value] ); return $this->field($name, Checkbox::class, $label, [ 'checked' => Checkbox::b($this->v($name), df_bool(dfa($data, 'checked'))) ] + $data); }
[ "protected", "function", "checkbox", "(", "$", "name", ",", "$", "label", "=", "null", ",", "$", "value", "=", "null", ",", "$", "note", "=", "null", ")", "{", "$", "data", "=", "is_array", "(", "$", "value", ")", "?", "$", "value", "+", "[", "...
2015-11-17 @param string $name @param string|null|Phrase $label [optional] @param array(string => mixed)|bool|string $value [optional] @param string|null $note [optional] @return \Magento\Framework\Data\Form\Element\Checkbox|E
[ "2015", "-", "11", "-", "17" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Form/Element/Fieldset.php#L159-L168
42,950
mage2pro/core
Framework/Form/Element/Fieldset.php
Fieldset.fieldset
protected function fieldset($class = null, $cssClass = null) { if (!$class) { $class = __CLASS__; } /** @var Fieldset $result */ // 2015-12-29 // Раньше имя создавалось так: df_uid(4, 'fs') $result = $this->addField($this->cn('fs' . $this->_childFieldsetNextId++), $class, [ /** * 2015-12-07 * Важно скопировать значения опций сюда, * чтобы дочерний филдсет мог создавать свои элементы * типа $fsCheckboxes->checkbox('bold', 'B'); * Что интересно, добавление вместо этого метода getValue * почему-то не работает: * function getValue() {return $this->top()->getData('value');} */ 'value' => $this['value'] ]); /** * 2015-12-12 * Флаг анонимности филдсета. * Анонимные филдсеты не добавляют своё имя в качестве префикса имён полей. */ $result->_anonymous = true; if ($cssClass) { $result->addClass($cssClass); } return $result; }
php
protected function fieldset($class = null, $cssClass = null) { if (!$class) { $class = __CLASS__; } /** @var Fieldset $result */ // 2015-12-29 // Раньше имя создавалось так: df_uid(4, 'fs') $result = $this->addField($this->cn('fs' . $this->_childFieldsetNextId++), $class, [ /** * 2015-12-07 * Важно скопировать значения опций сюда, * чтобы дочерний филдсет мог создавать свои элементы * типа $fsCheckboxes->checkbox('bold', 'B'); * Что интересно, добавление вместо этого метода getValue * почему-то не работает: * function getValue() {return $this->top()->getData('value');} */ 'value' => $this['value'] ]); /** * 2015-12-12 * Флаг анонимности филдсета. * Анонимные филдсеты не добавляют своё имя в качестве префикса имён полей. */ $result->_anonymous = true; if ($cssClass) { $result->addClass($cssClass); } return $result; }
[ "protected", "function", "fieldset", "(", "$", "class", "=", "null", ",", "$", "cssClass", "=", "null", ")", "{", "if", "(", "!", "$", "class", ")", "{", "$", "class", "=", "__CLASS__", ";", "}", "/** @var Fieldset $result */", "// 2015-12-29", "// Раньше ...
2015-12-29 @todo Видимо, от этого метода надо избавляться. Обратите внимание, как работает, например, @see \Df\Framework\Form\Element\Fieldset::size() Этот метод использует способ, который кажется мне более оптимальным: https://github.com/mage2pro/core/tree/e7fcbd9c04a904e9e0d196c56e6a60d6eab0835a/Framework/Data/Form/Element/Fieldset.php#L443 @param string|null $class [optional] @param string|null $cssClass [optional] @return Fieldset
[ "2015", "-", "12", "-", "29" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Form/Element/Fieldset.php#L311-L340
42,951
mage2pro/core
Framework/Form/Element/Fieldset.php
Fieldset.hidden
protected function hidden($name, $value, $label = null) { $result = $this->field($name, Hidden::class, $label, ['value' => $value]); $result->setAfterElementHtml($label); return $result; }
php
protected function hidden($name, $value, $label = null) { $result = $this->field($name, Hidden::class, $label, ['value' => $value]); $result->setAfterElementHtml($label); return $result; }
[ "protected", "function", "hidden", "(", "$", "name", ",", "$", "value", ",", "$", "label", "=", "null", ")", "{", "$", "result", "=", "$", "this", "->", "field", "(", "$", "name", ",", "Hidden", "::", "class", ",", "$", "label", ",", "[", "'value...
2015-12-28 @param string $name @param string $value @param string|null|Phrase $label [optional] @return Hidden
[ "2015", "-", "12", "-", "28" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Form/Element/Fieldset.php#L358-L362
42,952
mage2pro/core
Framework/Form/Element/Fieldset.php
Fieldset.size
protected function size($name, $label = null, $data = []) {return $this->quantity( $name, $label, $data + [Quantity::P__VALUES => SizeUnit::s()->toOptionArray()] );}
php
protected function size($name, $label = null, $data = []) {return $this->quantity( $name, $label, $data + [Quantity::P__VALUES => SizeUnit::s()->toOptionArray()] );}
[ "protected", "function", "size", "(", "$", "name", ",", "$", "label", "=", "null", ",", "$", "data", "=", "[", "]", ")", "{", "return", "$", "this", "->", "quantity", "(", "$", "name", ",", "$", "label", ",", "$", "data", "+", "[", "Quantity", ...
2015-12-11 @param string $name @param string|null|Phrase $label [optional] @param array(string => mixed) $data [optional] @return Quantity|E
[ "2015", "-", "12", "-", "11" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Form/Element/Fieldset.php#L508-L510
42,953
mage2pro/core
Framework/Form/Element/Fieldset.php
Fieldset.text
final protected function text($name, $label = null, $data = []) {return $this->field( $name, Text::class, $label, $data );}
php
final protected function text($name, $label = null, $data = []) {return $this->field( $name, Text::class, $label, $data );}
[ "final", "protected", "function", "text", "(", "$", "name", ",", "$", "label", "=", "null", ",", "$", "data", "=", "[", "]", ")", "{", "return", "$", "this", "->", "field", "(", "$", "name", ",", "Text", "::", "class", ",", "$", "label", ",", "...
2015-12-12 @used-by \Df\Framework\Form\Element\Quantity::onFormInitialized() @param string $name @param string|null|Phrase $label [optional] @param array(string => mixed) $data [optional] @return Text|E
[ "2015", "-", "12", "-", "12" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Form/Element/Fieldset.php#L520-L522
42,954
mage2pro/core
Framework/Form/Element/Fieldset.php
Fieldset.textarea
final protected function textarea($name, $label = null, $data = []) {return $this->field( $name, Textarea::class, $label, $data );}
php
final protected function textarea($name, $label = null, $data = []) {return $this->field( $name, Textarea::class, $label, $data );}
[ "final", "protected", "function", "textarea", "(", "$", "name", ",", "$", "label", "=", "null", ",", "$", "data", "=", "[", "]", ")", "{", "return", "$", "this", "->", "field", "(", "$", "name", ",", "Textarea", "::", "class", ",", "$", "label", ...
2018-04-20 @used-by \Doormall\Shipping\Partner\FE::onFormInitialized() @param string $name @param string|null|Phrase $label [optional] @param array(string => mixed) $data [optional] @return Textarea|E
[ "2018", "-", "04", "-", "20" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Form/Element/Fieldset.php#L532-L534
42,955
mage2pro/core
Framework/Form/Element/Fieldset.php
Fieldset.v
final protected function v($name = null) {return dfak($this, function() { $result = dfa($this->_data, 'value', []); /** * 2016-06-29 * Что интересно, при смене области действия настроек с глобальной на другую (сайт или магазин) * поле «value» может почему-то содержать не массив, * а строку JSON, соответствующую запакованному в JSON массиву: * https://code.dmitry-fedyuk.com/m2e/currency-format/issues/1 * Заметил это только для модуля «Price Format». */ return is_array($result) ? $result : df_json_decode($result); }, $name);}
php
final protected function v($name = null) {return dfak($this, function() { $result = dfa($this->_data, 'value', []); /** * 2016-06-29 * Что интересно, при смене области действия настроек с глобальной на другую (сайт или магазин) * поле «value» может почему-то содержать не массив, * а строку JSON, соответствующую запакованному в JSON массиву: * https://code.dmitry-fedyuk.com/m2e/currency-format/issues/1 * Заметил это только для модуля «Price Format». */ return is_array($result) ? $result : df_json_decode($result); }, $name);}
[ "final", "protected", "function", "v", "(", "$", "name", "=", "null", ")", "{", "return", "dfak", "(", "$", "this", ",", "function", "(", ")", "{", "$", "result", "=", "dfa", "(", "$", "this", "->", "_data", ",", "'value'", ",", "[", "]", ")", ...
2015-12-07 @used-by \Df\Framework\Form\Element\ArrayT::onFormInitialized() @param string|null $name [optional] @return string|null @throws DFE
[ "2015", "-", "12", "-", "07" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Form/Element/Fieldset.php#L543-L554
42,956
mage2pro/core
Payment/Init/Action.php
Action.sg
final static function sg(M $m) {return dfcf(function(M $m) { $c = df_con_hier($m, self::class); /** @var string $c */ return new $c($m); }, [$m]);}
php
final static function sg(M $m) {return dfcf(function(M $m) { $c = df_con_hier($m, self::class); /** @var string $c */ return new $c($m); }, [$m]);}
[ "final", "static", "function", "sg", "(", "M", "$", "m", ")", "{", "return", "dfcf", "(", "function", "(", "M", "$", "m", ")", "{", "$", "c", "=", "df_con_hier", "(", "$", "m", ",", "self", "::", "class", ")", ";", "/** @var string $c */", "return"...
2017-11-01 @used-by \Df\Payment\Method::getConfigPaymentAction() @used-by \Dfe\AlphaCommerceHub\Charge::pCharge() @used-by \Dfe\Stripe\W\Event\Source::ttCurrent() @used-by \Dfe\TBCBank\Charge::pCharge() @used-by \Dfe\TBCBank\W\Event::ttCurrent() @used-by \Dfe\Vantiv\Charge::pCharge() @param M $m @return self
[ "2017", "-", "11", "-", "01" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Init/Action.php#L318-L321
42,957
mage2pro/core
Sso/Button/Js.php
Js.attributes
protected function attributes() {return df_widget( $this, 'button', $this->jsOptions() + [ 'redirect' => $this->getUrl(df_route($this), df_clean([ '_secure' => $this->redirectShouldBeSecure()], false )) ,'type' => $this->s()->type() ] ) + parent::attributes();}
php
protected function attributes() {return df_widget( $this, 'button', $this->jsOptions() + [ 'redirect' => $this->getUrl(df_route($this), df_clean([ '_secure' => $this->redirectShouldBeSecure()], false )) ,'type' => $this->s()->type() ] ) + parent::attributes();}
[ "protected", "function", "attributes", "(", ")", "{", "return", "df_widget", "(", "$", "this", ",", "'button'", ",", "$", "this", "->", "jsOptions", "(", ")", "+", "[", "'redirect'", "=>", "$", "this", "->", "getUrl", "(", "df_route", "(", "$", "this",...
2016-11-28 @override @see \Df\Sso\Button::attributes() @used-by \Df\Sso\Button::loggedOut() @see \Dfe\FacebookLogin\Button::attributes() @return array(string => string)
[ "2016", "-", "11", "-", "28" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sso/Button/Js.php#L17-L24
42,958
mage2pro/core
Payment/Charge.php
Charge.description
final protected function description() {$s = $this->s(); return $this->text( $s->description(), $s->v('description_rules/maxLength/value') );}
php
final protected function description() {$s = $this->s(); return $this->text( $s->description(), $s->v('description_rules/maxLength/value') );}
[ "final", "protected", "function", "description", "(", ")", "{", "$", "s", "=", "$", "this", "->", "s", "(", ")", ";", "return", "$", "this", "->", "text", "(", "$", "s", "->", "description", "(", ")", ",", "$", "s", "->", "v", "(", "'description_...
2017-03-06 @used-by \Df\GingerPaymentsBase\Charge::pCustomer() @used-by \Df\StripeClone\P\Charge::request() @used-by \Dfe\AllPay\Charge::pCharge() @used-by \Dfe\AlphaCommerceHub\Charge::pCharge() @used-by \Dfe\CheckoutCom\Charge::_build() @used-by \Dfe\Dragonpay\Charge::pCharge() @used-by \Dfe\IPay88\Charge::pCharge() @used-by \Dfe\Qiwi\Charge::pBill() @used-by \Dfe\Robokassa\Charge::pCharge() @used-by \Dfe\TBCBank\Charge::common() @return string
[ "2017", "-", "03", "-", "06" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Charge.php#L61-L63
42,959
mage2pro/core
Customer/Observer/RegisterSuccess.php
RegisterSuccess.execute
function execute(O $o) { $c = df_customer($o['customer']); /** @var Customer $c */ $s = df_customer_session(); /** @var Session $s */ if ($s->getDfSsoId()) { $c[Schema::fIdC($s->getDfSsoProvider())] = $s->getDfSsoId(); /** * 2016-12-04 * Нельзя использовать здесь @see df_eav_update(), * потому что наше поле не является атрибутом EAV, * а является просто полем таблицы customer_entity. */ $c->save(); } $s->unsDfSsoId()->unsDfSsoProvider()->unsDfSsoRegistrationData(); $s->setDfNeedConfirm(df_customer_is_need_confirm($c)); }
php
function execute(O $o) { $c = df_customer($o['customer']); /** @var Customer $c */ $s = df_customer_session(); /** @var Session $s */ if ($s->getDfSsoId()) { $c[Schema::fIdC($s->getDfSsoProvider())] = $s->getDfSsoId(); /** * 2016-12-04 * Нельзя использовать здесь @see df_eav_update(), * потому что наше поле не является атрибутом EAV, * а является просто полем таблицы customer_entity. */ $c->save(); } $s->unsDfSsoId()->unsDfSsoProvider()->unsDfSsoRegistrationData(); $s->setDfNeedConfirm(df_customer_is_need_confirm($c)); }
[ "function", "execute", "(", "O", "$", "o", ")", "{", "$", "c", "=", "df_customer", "(", "$", "o", "[", "'customer'", "]", ")", ";", "/** @var Customer $c */", "$", "s", "=", "df_customer_session", "(", ")", ";", "/** @var Session $s */", "if", "(", "$", ...
2016-12-03 @override @see ObserverInterface::execute() @used-by \Magento\Framework\Event\Invoker\InvokerDefault::_callObserverMethod() @param O $o
[ "2016", "-", "12", "-", "03" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Customer/Observer/RegisterSuccess.php#L22-L37
42,960
mage2pro/core
Core/T/lib/csv.php
csv.t01
function t01() { $l = 'Test,Тест'; /** @var string $l */ $d = '"'; /** @var string $d */ if (!df_starts_with($l, $d)) { $p = mb_strpos($l, ','); $l = $d . mb_substr($l, 0, $p) . $d . mb_substr($l, $p); } if (!df_ends_with($l, $d)) { $p = mb_strrpos($l, ','); $l = mb_substr($l, 0, $p + 1) . $d . mb_substr($l, $p + 1) . $d; } print_r($l); }
php
function t01() { $l = 'Test,Тест'; /** @var string $l */ $d = '"'; /** @var string $d */ if (!df_starts_with($l, $d)) { $p = mb_strpos($l, ','); $l = $d . mb_substr($l, 0, $p) . $d . mb_substr($l, $p); } if (!df_ends_with($l, $d)) { $p = mb_strrpos($l, ','); $l = mb_substr($l, 0, $p + 1) . $d . mb_substr($l, $p + 1) . $d; } print_r($l); }
[ "function", "t01", "(", ")", "{", "$", "l", "=", "'Test,Тест'; /*", "*", "@var string $l */", "$", "d", "=", "'\"'", ";", "/** @var string $d */", "if", "(", "!", "df_starts_with", "(", "$", "l", ",", "$", "d", ")", ")", "{", "$", "p", "=", "mb_strpo...
2017-06-23
[ "2017", "-", "06", "-", "23" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Core/T/lib/csv.php#L9-L21
42,961
mage2pro/core
Sentry/ErrorHandler.php
ErrorHandler.registerExceptionHandler
function registerExceptionHandler($call_existing = true) { $this->old_exception_handler = set_exception_handler(array($this, 'handleException')); $this->call_existing_exception_handler = $call_existing; return $this; }
php
function registerExceptionHandler($call_existing = true) { $this->old_exception_handler = set_exception_handler(array($this, 'handleException')); $this->call_existing_exception_handler = $call_existing; return $this; }
[ "function", "registerExceptionHandler", "(", "$", "call_existing", "=", "true", ")", "{", "$", "this", "->", "old_exception_handler", "=", "set_exception_handler", "(", "array", "(", "$", "this", ",", "'handleException'", ")", ")", ";", "$", "this", "->", "cal...
Register a handler which will intercept unhnalded exceptions and report them to the associated Sentry client. @param bool $call_existing Call any existing exception handlers after processing this instance. @return $this
[ "Register", "a", "handler", "which", "will", "intercept", "unhnalded", "exceptions", "and", "report", "them", "to", "the", "associated", "Sentry", "client", "." ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/ErrorHandler.php#L131-L136
42,962
mage2pro/core
Sentry/ErrorHandler.php
ErrorHandler.registerErrorHandler
function registerErrorHandler($call_existing = true, $error_types = null) { if ($error_types !== null) { $this->error_types = $error_types; } $this->old_error_handler = set_error_handler(array($this, 'handleError'), E_ALL); $this->call_existing_error_handler = $call_existing; return $this; }
php
function registerErrorHandler($call_existing = true, $error_types = null) { if ($error_types !== null) { $this->error_types = $error_types; } $this->old_error_handler = set_error_handler(array($this, 'handleError'), E_ALL); $this->call_existing_error_handler = $call_existing; return $this; }
[ "function", "registerErrorHandler", "(", "$", "call_existing", "=", "true", ",", "$", "error_types", "=", "null", ")", "{", "if", "(", "$", "error_types", "!==", "null", ")", "{", "$", "this", "->", "error_types", "=", "$", "error_types", ";", "}", "$", ...
Register a handler which will intercept standard PHP errors and report them to the associated Sentry client. @param bool $call_existing Call any existing errors handlers after processing this instance. @param array $error_types All error types that should be sent. @return $this
[ "Register", "a", "handler", "which", "will", "intercept", "standard", "PHP", "errors", "and", "report", "them", "to", "the", "associated", "Sentry", "client", "." ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/ErrorHandler.php#L147-L155
42,963
mage2pro/core
Framework/Form/Element/GoogleFont.php
GoogleFont.onFormInitialized
final function onFormInitialized() { parent::onFormInitialized(); $this->addClass('df-google-font'); df_fe_init($this, __CLASS__, df_asset_third_party('Select2/main.css'), [ 'dataSource' => df_url_frontend('df-google-font') ,'value' => $this['value'] // 2015-12-07 It is the selected value. ]); }
php
final function onFormInitialized() { parent::onFormInitialized(); $this->addClass('df-google-font'); df_fe_init($this, __CLASS__, df_asset_third_party('Select2/main.css'), [ 'dataSource' => df_url_frontend('df-google-font') ,'value' => $this['value'] // 2015-12-07 It is the selected value. ]); }
[ "final", "function", "onFormInitialized", "(", ")", "{", "parent", "::", "onFormInitialized", "(", ")", ";", "$", "this", "->", "addClass", "(", "'df-google-font'", ")", ";", "df_fe_init", "(", "$", "this", ",", "__CLASS__", ",", "df_asset_third_party", "(", ...
2015-11-28 @override @see \Df\Framework\Form\Hidden::onFormInitialized() @used-by \Df\Framework\Plugin\Data\Form\Element\AbstractElement::afterSetForm()
[ "2015", "-", "11", "-", "28" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Form/Element/GoogleFont.php#L12-L19
42,964
mage2pro/core
Sso/CustomerReturn.php
CustomerReturn.c
protected function c() {return dfc($this, function() { $result = df_new(df_con_heir($this, DC::class)); /** @var DC $result */ $result->validate(); return $result; });}
php
protected function c() {return dfc($this, function() { $result = df_new(df_con_heir($this, DC::class)); /** @var DC $result */ $result->validate(); return $result; });}
[ "protected", "function", "c", "(", ")", "{", "return", "dfc", "(", "$", "this", ",", "function", "(", ")", "{", "$", "result", "=", "df_new", "(", "df_con_heir", "(", "$", "this", ",", "DC", "::", "class", ")", ")", ";", "/** @var DC $result */", "$"...
2016-06-04 2016-12-01 @see \Dfe\AmazonLogin\Customer @see \Dfe\FacebookLogin\Customer 2017-02-26 @final I do not use the PHP «final» keyword here to allow refine the return type using PHPDoc. @see \Dfe\FacebookLogin\Controller\Index\Index @see \Dfe\AmazonLogin\Controller\Index\Index @return DC
[ "2016", "-", "06", "-", "04", "2016", "-", "12", "-", "01" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sso/CustomerReturn.php#L84-L88
42,965
mage2pro/core
Payment/W/Reader.php
Reader.t
final function t() {return dfc($this, function() {return is_null($r = $this->tRaw()) ? null : $this->te2i($r) ;});}
php
final function t() {return dfc($this, function() {return is_null($r = $this->tRaw()) ? null : $this->te2i($r) ;});}
[ "final", "function", "t", "(", ")", "{", "return", "dfc", "(", "$", "this", ",", "function", "(", ")", "{", "return", "is_null", "(", "$", "r", "=", "$", "this", "->", "tRaw", "(", ")", ")", "?", "null", ":", "$", "this", "->", "te2i", "(", "...
2017-03-10 Some PSP send only one type of notifications. In such case, a notification does not denote its own type, and this method returns null. 2017-03-13 The result is in our internal format, not in the PSP format. @used-by tl() @used-by \Df\Payment\W\Event::t() @used-by \Df\Payment\W\F::c() @used-by \Dfe\AllPay\W\Reader::isOffline() @return string|null
[ "2017", "-", "03", "-", "10", "Some", "PSP", "send", "only", "one", "type", "of", "notifications", ".", "In", "such", "case", "a", "notification", "does", "not", "denote", "its", "own", "type", "and", "this", "method", "returns", "null", ".", "2017", "...
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/W/Reader.php#L94-L96
42,966
mage2pro/core
Payment/W/Reader.php
Reader.error
private function error($reason) { ($r = $this->r()) ? df_sentry_extra($this, 'Request', $r) : null; throw new Critical($this->_m, $this, "The request is invalid because $reason."); }
php
private function error($reason) { ($r = $this->r()) ? df_sentry_extra($this, 'Request', $r) : null; throw new Critical($this->_m, $this, "The request is invalid because $reason."); }
[ "private", "function", "error", "(", "$", "reason", ")", "{", "(", "$", "r", "=", "$", "this", "->", "r", "(", ")", ")", "?", "df_sentry_extra", "(", "$", "this", ",", "'Request'", ",", "$", "r", ")", ":", "null", ";", "throw", "new", "Critical",...
2017-03-10 @used-by errorP() @param string $reason @throws Critical
[ "2017", "-", "03", "-", "10" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/W/Reader.php#L179-L182
42,967
mage2pro/core
Config/Source/WaitPeriodType.php
WaitPeriodType.calculate
static function calculate(S $s, $k = null, $kType = 'waitPeriodType') { $k = $k ?: df_caller_f(); /** @type string */ return dfcf(function(S $s, $k, $kType) { $r = $s->nat($k); /** @var int $r */ return self::$WORKING_DAYS === $s->v($kType) ? $r : df_num_calendar_days_by_num_working_days(ZD::now(), $r, $s->scope()) ; }, [$s, $k, $kType]); }
php
static function calculate(S $s, $k = null, $kType = 'waitPeriodType') { $k = $k ?: df_caller_f(); /** @type string */ return dfcf(function(S $s, $k, $kType) { $r = $s->nat($k); /** @var int $r */ return self::$WORKING_DAYS === $s->v($kType) ? $r : df_num_calendar_days_by_num_working_days(ZD::now(), $r, $s->scope()) ; }, [$s, $k, $kType]); }
[ "static", "function", "calculate", "(", "S", "$", "s", ",", "$", "k", "=", "null", ",", "$", "kType", "=", "'waitPeriodType'", ")", "{", "$", "k", "=", "$", "k", "?", ":", "df_caller_f", "(", ")", ";", "/** @type string */", "return", "dfcf", "(", ...
2017-07-30 @used-by \Dfe\AllPay\Settings::waitPeriodATM() @used-by \Dfe\Moip\Settings\Boleto::waitPeriod() @used-by \Dfe\Qiwi\Settings::waitPeriod() @param S $s @param string|null $k [optional] @param string $kType [optional] @return int
[ "2017", "-", "07", "-", "30" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Config/Source/WaitPeriodType.php#L30-L38
42,968
mage2pro/core
Shipping/Method.php
Method.getConfigData
final function getConfigData($k) { static $map = [ /** * 2018-04-21 * @used-by \Magento\Shipping\Model\Config::getActiveCarriers(): * public function getActiveCarriers($store = null) { * $carriers = []; * $config = $this->_scopeConfig->getValue('carriers', * \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $store * ); * foreach (array_keys($config) as $carrierCode) { * if ($this->_scopeConfig->isSetFlag( * 'carriers/' . $carrierCode . '/active', * \Magento\Store\Model\ScopeInterface::SCOPE_STORE, * $store * )) { * $carrierModel = $this->_carrierFactory->create($carrierCode, $store); * if ($carrierModel) { * $carriers[$carrierCode] = $carrierModel; * } * } * } * return $carriers; * } * https://github.com/magento/magento2/blob/2.2.3/app/code/Magento/Shipping/Model/Config.php#L58-L77 * @uses \Df\Shipping\Method::isActive() */ 'active' => 'isActive' /** * 2018-04-21 * @used-by \Magento\Shipping\Model\Shipping::collectCarrierRates(): * if ($carrier->getConfigData('showmethod') == 0 && $result->getError()) { * return $this; * } * https://github.com/magento/magento2/blob/2.2.3/app/code/Magento/Shipping/Model/Shipping.php#L311-L313 * @uses \Df\Shipping\Method::showMethod() */ ,'showmethod' => 'showMethod' ]; return isset($map[$k]) ? call_user_func([$this, $map[$k]]) : $this->s($k); }
php
final function getConfigData($k) { static $map = [ /** * 2018-04-21 * @used-by \Magento\Shipping\Model\Config::getActiveCarriers(): * public function getActiveCarriers($store = null) { * $carriers = []; * $config = $this->_scopeConfig->getValue('carriers', * \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $store * ); * foreach (array_keys($config) as $carrierCode) { * if ($this->_scopeConfig->isSetFlag( * 'carriers/' . $carrierCode . '/active', * \Magento\Store\Model\ScopeInterface::SCOPE_STORE, * $store * )) { * $carrierModel = $this->_carrierFactory->create($carrierCode, $store); * if ($carrierModel) { * $carriers[$carrierCode] = $carrierModel; * } * } * } * return $carriers; * } * https://github.com/magento/magento2/blob/2.2.3/app/code/Magento/Shipping/Model/Config.php#L58-L77 * @uses \Df\Shipping\Method::isActive() */ 'active' => 'isActive' /** * 2018-04-21 * @used-by \Magento\Shipping\Model\Shipping::collectCarrierRates(): * if ($carrier->getConfigData('showmethod') == 0 && $result->getError()) { * return $this; * } * https://github.com/magento/magento2/blob/2.2.3/app/code/Magento/Shipping/Model/Shipping.php#L311-L313 * @uses \Df\Shipping\Method::showMethod() */ ,'showmethod' => 'showMethod' ]; return isset($map[$k]) ? call_user_func([$this, $map[$k]]) : $this->s($k); }
[ "final", "function", "getConfigData", "(", "$", "k", ")", "{", "static", "$", "map", "=", "[", "/**\n\t\t\t * 2018-04-21\n\t\t\t * @used-by \\Magento\\Shipping\\Model\\Config::getActiveCarriers():\n\t\t\t * \tpublic function getActiveCarriers($store = null) {\n\t\t\t * \t\t$carriers = [];\...
2018-04-17 @override @see IAC::getConfigData() https://github.com/magento/magento2/blob/2.2.3/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierInterface.php#L15-L22 @see AC::getConfigData(): public function getConfigData($field) { if (empty($this->_code)) { return false; } $path = 'carriers/' . $this->_code . '/' . $field; return $this->_scopeConfig->getValue( $path, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $this->getStore() ); } https://github.com/magento/magento2/blob/2.2.3/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php#L122-L140 1) @used-by \Magento\Shipping\Model\Shipping::collectCarrierRates(): if ($carrier->getConfigData('shipment_requesttype')) { https://github.com/magento/magento2/blob/2.2.3/app/code/Magento/Shipping/Model/Shipping.php#L270-L306 2) @used-by \Magento\Shipping\Model\Shipping::collectCarrierRates(): if ($carrier->getConfigData('showmethod') == 0 && $result->getError()) { return $this; } https://github.com/magento/magento2/blob/2.2.3/app/code/Magento/Shipping/Model/Shipping.php#L311-L313 @param string $k @return mixed
[ "2018", "-", "04", "-", "17" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Shipping/Method.php#L195-L235
42,969
mage2pro/core
Framework/Composer/ComposerFactory.php
ComposerFactory.create
function create() { if (!getenv('COMPOSER_HOME')) { putenv('COMPOSER_HOME=' . $this->directoryList->getPath(DirectoryList::COMPOSER_HOME)); } return \Composer\Factory::create( new BufferIO(), $this->composerJsonFinder->findComposerJson() ); }
php
function create() { if (!getenv('COMPOSER_HOME')) { putenv('COMPOSER_HOME=' . $this->directoryList->getPath(DirectoryList::COMPOSER_HOME)); } return \Composer\Factory::create( new BufferIO(), $this->composerJsonFinder->findComposerJson() ); }
[ "function", "create", "(", ")", "{", "if", "(", "!", "getenv", "(", "'COMPOSER_HOME'", ")", ")", "{", "putenv", "(", "'COMPOSER_HOME='", ".", "$", "this", "->", "directoryList", "->", "getPath", "(", "DirectoryList", "::", "COMPOSER_HOME", ")", ")", ";", ...
Create \Composer\Composer @return \Composer\Composer @throws \Exception
[ "Create", "\\", "Composer", "\\", "Composer" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Composer/ComposerFactory.php#L45-L54
42,970
mage2pro/core
Sso/Button.php
Button.attributes
protected function attributes() {return ($this->isNative() ? $this->attributesN() : ['href' => $this->lHref(), 'title' => $this->s()->label()] ) + [ 'class' => df_cc_s( 'df-sso-button', $this->cssClass(), $this->s()->type(), $this->cssClass2() ) ,'id' => df_uid(4, "{$this->cssClass()}-") ,'rel' => 'nofollow' ] ;}
php
protected function attributes() {return ($this->isNative() ? $this->attributesN() : ['href' => $this->lHref(), 'title' => $this->s()->label()] ) + [ 'class' => df_cc_s( 'df-sso-button', $this->cssClass(), $this->s()->type(), $this->cssClass2() ) ,'id' => df_uid(4, "{$this->cssClass()}-") ,'rel' => 'nofollow' ] ;}
[ "protected", "function", "attributes", "(", ")", "{", "return", "(", "$", "this", "->", "isNative", "(", ")", "?", "$", "this", "->", "attributesN", "(", ")", ":", "[", "'href'", "=>", "$", "this", "->", "lHref", "(", ")", ",", "'title'", "=>", "$"...
2016-11-26 @used-by loggedOut() @see \Df\Sso\Button\Js::attributes() @see \Dfe\FacebookLogin\Button::attributes() @return array(string => string)
[ "2016", "-", "11", "-", "26" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sso/Button.php#L70-L81
42,971
mage2pro/core
Payment/Observer/VoidT.php
VoidT.execute
function execute(Observer $ob) { /** @var OP $op */ if (dfp_my($op = $ob['payment'])) { $op->getOrder()->setState(O::STATE_CLOSED)->setStatus(df_order_ds(O::STATE_CLOSED)); } }
php
function execute(Observer $ob) { /** @var OP $op */ if (dfp_my($op = $ob['payment'])) { $op->getOrder()->setState(O::STATE_CLOSED)->setStatus(df_order_ds(O::STATE_CLOSED)); } }
[ "function", "execute", "(", "Observer", "$", "ob", ")", "{", "/** @var OP $op */", "if", "(", "dfp_my", "(", "$", "op", "=", "$", "ob", "[", "'payment'", "]", ")", ")", "{", "$", "op", "->", "getOrder", "(", ")", "->", "setState", "(", "O", "::", ...
2017-01-17 @override @see ObserverInterface::execute() @used-by \Magento\Framework\Event\Invoker\InvokerDefault::_callObserverMethod() @param Observer $ob
[ "2017", "-", "01", "-", "17" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Observer/VoidT.php#L63-L68
42,972
mage2pro/core
API/Facade.php
Facade.path
protected function path($id, $suffix) {return df_cc_path( $this->prefix(), strtolower(df_class_l($this)) . 's', urlencode($id), $suffix );}
php
protected function path($id, $suffix) {return df_cc_path( $this->prefix(), strtolower(df_class_l($this)) . 's', urlencode($id), $suffix );}
[ "protected", "function", "path", "(", "$", "id", ",", "$", "suffix", ")", "{", "return", "df_cc_path", "(", "$", "this", "->", "prefix", "(", ")", ",", "strtolower", "(", "df_class_l", "(", "$", "this", ")", ")", ".", "'s'", ",", "urlencode", "(", ...
2017-12-03 @used-by p() @see \Dfe\AlphaCommerceHub\API\Facade::path() @see \Dfe\TBCBank\API\Facade::path() @see \Dfe\Vantiv\API\Facade::path() @see \Inkifi\Mediaclip\API\Facade\User::path() @param int|string|null $id @param string|null $suffix @return string
[ "2017", "-", "12", "-", "03" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/API/Facade.php#L231-L233
42,973
mage2pro/core
Sentry/Breadcrumbs/ErrorHandler.php
ErrorHandler.handleError
final function handleError($code, $m, $file = '', $line = 0, $context=[]) { // 2017-07-10 // «Magento 2.1 php7.1 will not be supported due to mcrypt deprecation» // https://github.com/magento/magento2/issues/5880 // [PHP 7.1] How to fix the «Function mcrypt_module_open() is deprecated» bug? // https://mage2.pro/t/2392 if (E_DEPRECATED !== $code || !df_contains($m, 'mcrypt') && !df_contains($m, 'mdecrypt')) { $this->ravenClient->breadcrumbs->record([ 'category' => 'error_reporting', 'message' => $m, 'level' => $this->ravenClient->translateSeverity($code), 'data' => ['code' => $code, 'line' => $line, 'file' => $file] ]); } return !$this->existingHandler ? false : call_user_func( $this->existingHandler, $code, $m, $file, $line, $context ); }
php
final function handleError($code, $m, $file = '', $line = 0, $context=[]) { // 2017-07-10 // «Magento 2.1 php7.1 will not be supported due to mcrypt deprecation» // https://github.com/magento/magento2/issues/5880 // [PHP 7.1] How to fix the «Function mcrypt_module_open() is deprecated» bug? // https://mage2.pro/t/2392 if (E_DEPRECATED !== $code || !df_contains($m, 'mcrypt') && !df_contains($m, 'mdecrypt')) { $this->ravenClient->breadcrumbs->record([ 'category' => 'error_reporting', 'message' => $m, 'level' => $this->ravenClient->translateSeverity($code), 'data' => ['code' => $code, 'line' => $line, 'file' => $file] ]); } return !$this->existingHandler ? false : call_user_func( $this->existingHandler, $code, $m, $file, $line, $context ); }
[ "final", "function", "handleError", "(", "$", "code", ",", "$", "m", ",", "$", "file", "=", "''", ",", "$", "line", "=", "0", ",", "$", "context", "=", "[", "]", ")", "{", "// 2017-07-10", "// «Magento 2.1 php7.1 will not be supported due to mcrypt deprecation...
2017-07-10 @param int $code @param string $m @param string $file @param int $line @param array $context @return bool|mixed
[ "2017", "-", "07", "-", "10" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sentry/Breadcrumbs/ErrorHandler.php#L31-L48
42,974
mage2pro/core
Framework/Module/PackageInfoFactory.php
PackageInfoFactory.create
function create() {$om = $this->objectManager; return $om->create(PackageInfo::class, [ 'reader' => $om->create(Reader::class, ['moduleList' => $om->create(FullModuleList::class)]) ]);}
php
function create() {$om = $this->objectManager; return $om->create(PackageInfo::class, [ 'reader' => $om->create(Reader::class, ['moduleList' => $om->create(FullModuleList::class)]) ]);}
[ "function", "create", "(", ")", "{", "$", "om", "=", "$", "this", "->", "objectManager", ";", "return", "$", "om", "->", "create", "(", "PackageInfo", "::", "class", ",", "[", "'reader'", "=>", "$", "om", "->", "create", "(", "Reader", "::", "class",...
2017-07-26 2017-08-09 We override the parent's method to use @see \Df\Framework\Module\Dir\Reader instead of @see \Magento\Framework\Module\Dir\Reader @override @see \Magento\Framework\Module\PackageInfoFactory::create(): public function create() { $fullModuleList = $this->objectManager->create(\Magento\Framework\Module\FullModuleList::class); $reader = $this->objectManager->create( \Magento\Framework\Module\Dir\Reader::class, ['moduleList' => $fullModuleList] ); return $this->objectManager->create( \Magento\Framework\Module\PackageInfo::class, ['reader' => $reader] ); } https://github.com/magento/magento2/blob/2.2.0-RC1.8/lib/internal/Magento/Framework/Module/PackageInfoFactory.php#L30-L43 @used-by \Magento\Framework\Module\DependencyChecker::__construct(): $this->packageInfo = $packageInfoFactory->create(); https://github.com/magento/magento2/blob/2.2.0-RC1.8/lib/internal/Magento/Framework/Module/DependencyChecker.php#L41-L53 @return PackageInfo
[ "2017", "-", "07", "-", "26", "2017", "-", "08", "-", "09", "We", "override", "the", "parent", "s", "method", "to", "use" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Module/PackageInfoFactory.php#L38-L40
42,975
mage2pro/core
Payment/Observer/Multishipping.php
Multishipping.execute
function execute(O $o) { if (df_is_checkout_multishipping()) { $p = $o['payment']; /** @var OP $p */ /** * 2017-08-28 * I intentionally do not use @see dfp_my() here, * because this function will instantiate a @see \Df\Payment\Method instance * (or use a previously cached instance). */ if (df_starts_with(($code = $p->getMethod()), 'dfe_')) { /** @var string $code */ Method::sgReset(); if ($cardId = Token::exchangedGet($code)) { /** @var string|null $cardId */ dfp_add_info($p, [Token::KEY => $cardId]); } } } }
php
function execute(O $o) { if (df_is_checkout_multishipping()) { $p = $o['payment']; /** @var OP $p */ /** * 2017-08-28 * I intentionally do not use @see dfp_my() here, * because this function will instantiate a @see \Df\Payment\Method instance * (or use a previously cached instance). */ if (df_starts_with(($code = $p->getMethod()), 'dfe_')) { /** @var string $code */ Method::sgReset(); if ($cardId = Token::exchangedGet($code)) { /** @var string|null $cardId */ dfp_add_info($p, [Token::KEY => $cardId]); } } } }
[ "function", "execute", "(", "O", "$", "o", ")", "{", "if", "(", "df_is_checkout_multishipping", "(", ")", ")", "{", "$", "p", "=", "$", "o", "[", "'payment'", "]", ";", "/** @var OP $p */", "/**\n\t\t\t * 2017-08-28\n\t\t\t * I intentionally do not use @see dfp_my()...
2017-08-28 @override @see ObserverInterface::execute() @used-by \Magento\Framework\Event\Invoker\InvokerDefault::_callObserverMethod() @param O $o
[ "2017", "-", "08", "-", "28" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Observer/Multishipping.php#L44-L60
42,976
mage2pro/core
Framework/Plugin/Mail/TransportInterfaceFactory.php
TransportInterfaceFactory.aroundCreate
function aroundCreate(Sb $sb, \Closure $f, array $data = []) { $container = new O; /** @var O $container */ /** 2018-01-28 @used-by \Df\Framework\Mail\TransportObserver::execute() */ df_dispatch('df_mail_transport', [self::CONTAINER => $container]); /** @var string|null $c */ return ($c = $container[self::K_TRANSPORT]) ? df_new_om($c, $data) : $f($data); }
php
function aroundCreate(Sb $sb, \Closure $f, array $data = []) { $container = new O; /** @var O $container */ /** 2018-01-28 @used-by \Df\Framework\Mail\TransportObserver::execute() */ df_dispatch('df_mail_transport', [self::CONTAINER => $container]); /** @var string|null $c */ return ($c = $container[self::K_TRANSPORT]) ? df_new_om($c, $data) : $f($data); }
[ "function", "aroundCreate", "(", "Sb", "$", "sb", ",", "\\", "Closure", "$", "f", ",", "array", "$", "data", "=", "[", "]", ")", "{", "$", "container", "=", "new", "O", ";", "/** @var O $container */", "/** 2018-01-28 @used-by \\Df\\Framework\\Mail\\TransportObs...
2018-01-28 The purpose of this plugin is to provide an ability to my Dfe_Mailgun and Dfe_SMTP modules to use an alternative mail transport instead of \Zend\Mail\Transport\Sendmail @see \Magento\Email\Model\Transport::__construct(): $this->zendTransport = new Sendmail($parameters); https://github.com/magento/magento2/blob/1a81e05b/app/code/Magento/Email/Model/Transport.php#L73 https://github.com/mage2pro/mailgun https://github.com/mage2pro/smtp @see \Magento\Framework\Mail\TransportInterfaceFactory::create(): public function create(array $data = []) { return $this->_objectManager->create($this->_instanceName, $data); } https://github.com/magento/magento2/blob/2.2.2/lib/internal/Magento/Framework/Mail/TransportInterfaceFactory.php#L42-L51 https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/Mail/TransportInterfaceFactory.php#L42-L51 @param Sb $sb @param \Closure $f @param array $data [optional] @return string
[ "2018", "-", "01", "-", "28", "The", "purpose", "of", "this", "plugin", "is", "to", "provide", "an", "ability", "to", "my", "Dfe_Mailgun", "and", "Dfe_SMTP", "modules", "to", "use", "an", "alternative", "mail", "transport", "instead", "of", "\\", "Zend", ...
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Plugin/Mail/TransportInterfaceFactory.php#L27-L33
42,977
mage2pro/core
Payment/Operation/Source.php
Source.addressBS
final function addressBS() { $a = $this->addressB(); /** @var OA|QA $r */ return $a->getFirstname() ? $a : $this->addressS(true); }
php
final function addressBS() { $a = $this->addressB(); /** @var OA|QA $r */ return $a->getFirstname() ? $a : $this->addressS(true); }
[ "final", "function", "addressBS", "(", ")", "{", "$", "a", "=", "$", "this", "->", "addressB", "(", ")", ";", "/** @var OA|QA $r */", "return", "$", "a", "->", "getFirstname", "(", ")", "?", "$", "a", ":", "$", "this", "->", "addressS", "(", "true", ...
2016-07-02 2017-12-21 Previously, I used @see addressMixed() here: return $this->addressMixed($bs = true); https://github.com/mage2pro/core/blob/3.5.2/Payment/Operation/Source.php#L80-L86 https://github.com/mage2pro/core/blob/3.5.2/Payment/Operation/Source.php#L217-L267 Now I think that such address mix is a bad idea. because the result address could contain components of completely different addresses. @see addressSB() @used-by \Df\Payment\Operation::addressBS() @return OA|QA|null
[ "2016", "-", "07", "-", "02", "2017", "-", "12", "-", "21", "Previously", "I", "used" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Operation/Source.php#L93-L96
42,978
mage2pro/core
StripeClone/CardFormatter.php
CardFormatter.exp
final function exp() {/** @var int $e */ /** @var int $m */return !($m = $this->_c->expMonth()) || !($e = $this->_c->expYear()) ? null : implode(' / ', [sprintf('%02d', $m), $e]) ;}
php
final function exp() {/** @var int $e */ /** @var int $m */return !($m = $this->_c->expMonth()) || !($e = $this->_c->expYear()) ? null : implode(' / ', [sprintf('%02d', $m), $e]) ;}
[ "final", "function", "exp", "(", ")", "{", "/** @var int $e */", "/** @var int $m */", "return", "!", "(", "$", "m", "=", "$", "this", "->", "_c", "->", "expMonth", "(", ")", ")", "||", "!", "(", "$", "e", "=", "$", "this", "->", "_c", "->", "expYe...
2017-02-11 2017-07-19 Some PSPs like Moip does not return the card's expiration date. @see \Dfe\Moip\Facade\Card::expMonth() @see \Dfe\Moip\Facade\Card::expYear() https://github.com/mage2pro/moip/blob/0.7.6/Facade/Card.php#L84-L104 @used-by \Df\StripeClone\Block\Info::prepare() @return string|null
[ "2017", "-", "02", "-", "11", "2017", "-", "07", "-", "19", "Some", "PSPs", "like", "Moip", "does", "not", "return", "the", "card", "s", "expiration", "date", "." ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/StripeClone/CardFormatter.php#L38-L41
42,979
mage2pro/core
StripeClone/CardFormatter.php
CardFormatter.s
final static function s($m, C $c) {return dfcf(function($m, C $c) { /** * 2017-07-19 * Unable to reduce the implementation to: * df_new(df_con_hier($m, self::class), $c); * because @uses __construct() is protected. * It is similar to @see \Df\Payment\Facade::s() * https://github.com/mage2pro/core/blob/2.8.25/Payment/Facade.php#L75-L87 */ $class = df_con_hier($m, self::class); /** @var string $class */ return new $class($c); }, func_get_args());}
php
final static function s($m, C $c) {return dfcf(function($m, C $c) { /** * 2017-07-19 * Unable to reduce the implementation to: * df_new(df_con_hier($m, self::class), $c); * because @uses __construct() is protected. * It is similar to @see \Df\Payment\Facade::s() * https://github.com/mage2pro/core/blob/2.8.25/Payment/Facade.php#L75-L87 */ $class = df_con_hier($m, self::class); /** @var string $class */ return new $class($c); }, func_get_args());}
[ "final", "static", "function", "s", "(", "$", "m", ",", "C", "$", "c", ")", "{", "return", "dfcf", "(", "function", "(", "$", "m", ",", "C", "$", "c", ")", "{", "/**\n\t\t * 2017-07-19\n\t\t * Unable to reduce the implementation to:\n\t\t * \t\tdf_new(df_con_hier(...
2017-07-19 @used-by \Df\StripeClone\Block\Info::cf() @used-by \Df\StripeClone\ConfigProvider::cards() @used-by \Df\StripeClone\Method::chargeNew() @param string|object $m @param C $c @return self
[ "2017", "-", "07", "-", "19" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/StripeClone/CardFormatter.php#L94-L105
42,980
mage2pro/core
Payment/Choice.php
Choice.f
final static function f($op) {return dfcf(function(OP $op) { $c = df_con_hier($m = df_ar(dfpm($op), M::class), __CLASS__); /** @var string $c */ /** @var M $m */ return new $c($m); }, [dfp($op)]);}
php
final static function f($op) {return dfcf(function(OP $op) { $c = df_con_hier($m = df_ar(dfpm($op), M::class), __CLASS__); /** @var string $c */ /** @var M $m */ return new $c($m); }, [dfp($op)]);}
[ "final", "static", "function", "f", "(", "$", "op", ")", "{", "return", "dfcf", "(", "function", "(", "OP", "$", "op", ")", "{", "$", "c", "=", "df_con_hier", "(", "$", "m", "=", "df_ar", "(", "dfpm", "(", "$", "op", ")", ",", "M", "::", "cla...
2017-04-17 @used-by dfp_choice() @param II|OP|QP|O|Q|T $op @return self
[ "2017", "-", "04", "-", "17" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Choice.php#L119-L122
42,981
mage2pro/core
Xml/Parser/Entity.php
Entity.leaf
function leaf($name, $default = null, $function = 'df_leaf') { /** @var string $key */ $key = "$name::$function"; if (!isset($this->{__METHOD__}[$key])) { $this->{__METHOD__}[$key] = df_n_set(call_user_func($function, $this->e()->{$name})); } /** @var string|null $result */ $result = df_n_get($this->{__METHOD__}[$key]); return df_if1(is_null($result), $default, $result); }
php
function leaf($name, $default = null, $function = 'df_leaf') { /** @var string $key */ $key = "$name::$function"; if (!isset($this->{__METHOD__}[$key])) { $this->{__METHOD__}[$key] = df_n_set(call_user_func($function, $this->e()->{$name})); } /** @var string|null $result */ $result = df_n_get($this->{__METHOD__}[$key]); return df_if1(is_null($result), $default, $result); }
[ "function", "leaf", "(", "$", "name", ",", "$", "default", "=", "null", ",", "$", "function", "=", "'df_leaf'", ")", "{", "/** @var string $key */", "$", "key", "=", "\"$name::$function\"", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "{", "__...
2015-08-16 @used-by leafB() @used-by leafF() @used-by leafI() @used-by leafSne() @param string $name @param string|null|callable $default [optional] @param string $function [optional] @return string|null
[ "2015", "-", "08", "-", "16" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Xml/Parser/Entity.php#L119-L128
42,982
mage2pro/core
Payment/Method.php
Method.amountFactor
protected function amountFactor() {return df_find(function($factor, $list) {return in_array($this->cPayment(), df_csv_parse($list)) ? $factor : null ;}, $this->amountFactorTable(), [], [], DF_BEFORE) ?: 100;}
php
protected function amountFactor() {return df_find(function($factor, $list) {return in_array($this->cPayment(), df_csv_parse($list)) ? $factor : null ;}, $this->amountFactorTable(), [], [], DF_BEFORE) ?: 100;}
[ "protected", "function", "amountFactor", "(", ")", "{", "return", "df_find", "(", "function", "(", "$", "factor", ",", "$", "list", ")", "{", "return", "in_array", "(", "$", "this", "->", "cPayment", "(", ")", ",", "df_csv_parse", "(", "$", "list", ")"...
2016-11-13 @used-by \Df\Payment\Method::amountFormat() @used-by \Df\Payment\Method::amountParse() @see \Dfe\AllPay\Method::amountFactor() @see \Dfe\AlphaCommerceHub\Method::amountFactor() @see \Dfe\Dragonpay\Method::amountFactor() @see \Dfe\IPay88\Method::amountFactor() @see \Dfe\Robokassa\Method::amountFactor() @see \Dfe\TwoCheckout\Method::amountFactor() @return int
[ "2016", "-", "11", "-", "13" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Method.php#L1862-L1864
42,983
mage2pro/core
Payment/Method.php
Method.convert
private function convert($a) {return call_user_func( [$this->currency(), lcfirst(substr(df_caller_f(), 1))], $a, $this->oq() );}
php
private function convert($a) {return call_user_func( [$this->currency(), lcfirst(substr(df_caller_f(), 1))], $a, $this->oq() );}
[ "private", "function", "convert", "(", "$", "a", ")", "{", "return", "call_user_func", "(", "[", "$", "this", "->", "currency", "(", ")", ",", "lcfirst", "(", "substr", "(", "df_caller_f", "(", ")", ",", "1", ")", ")", "]", ",", "$", "a", ",", "$...
2016-09-06 @uses \Df\Payment\Currency::fromBase() @uses \Df\Payment\Currency::fromOrder() @uses \Df\Payment\Currency::toBase() @uses \Df\Payment\Currency::toOrder() @used-by cFromBase() @used-by cToBase() @used-by cToOrder() @param float $a @return float
[ "2016", "-", "09", "-", "06" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Method.php#L2052-L2054
42,984
mage2pro/core
Config/Settings.php
Settings.b
final function b($k = null, $s = null, $d = false) {return df_bool($this->v( $k ?: df_caller_f(), $s, $d ));}
php
final function b($k = null, $s = null, $d = false) {return df_bool($this->v( $k ?: df_caller_f(), $s, $d ));}
[ "final", "function", "b", "(", "$", "k", "=", "null", ",", "$", "s", "=", "null", ",", "$", "d", "=", "false", ")", "{", "return", "df_bool", "(", "$", "this", "->", "v", "(", "$", "k", "?", ":", "df_caller_f", "(", ")", ",", "$", "s", ",",...
2015-11-09 @used-by \Df\API\Settings::test() @used-by \Df\Payment\Settings\_3DS::disable_() @used-by \Df\Payment\Settings\_3DS::enable_() @used-by \Df\Payment\Settings\Options::isLimited() @used-by \Df\Payment\Settings\Proxy::enable() @used-by \Dfe\AlphaCommerceHub\ConfigProvider::option() @used-by \Dfe\Moip\ConfigProvider::config() @used-by \Dfe\Stripe\ConfigProvider::config() @used-by \Dfe\TBCBank\Settings::tokenization() @used-by \Dfe\YandexKassa\Charge::pLoan() @used-by \Dfe\YandexKassa\Charge::pTax() @param string|null $k [optional] @param null|string|int|S|Store $s [optional] @param bool $d [optional] @return int
[ "2015", "-", "11", "-", "09" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Config/Settings.php#L90-L92
42,985
mage2pro/core
Config/Settings.php
Settings.scope
final function scope($s = null) {return !is_null($s) ? $s : ( df_is_backend() && df_is_system_config() ? df_scope() : $this->scopeDefault() );}
php
final function scope($s = null) {return !is_null($s) ? $s : ( df_is_backend() && df_is_system_config() ? df_scope() : $this->scopeDefault() );}
[ "final", "function", "scope", "(", "$", "s", "=", "null", ")", "{", "return", "!", "is_null", "(", "$", "s", ")", "?", "$", "s", ":", "(", "df_is_backend", "(", ")", "&&", "df_is_system_config", "(", ")", "?", "df_scope", "(", ")", ":", "$", "thi...
2016-03-08 2017-10-25 @uses df_is_backend() is a dirty hack here: a call for @see df_is_system_config() from @see \Dfe\Portal\Plugin\Theme\Model\View\Design::beforeGetConfigurationDesignTheme() breaks my frontend... https://github.com/mage2pro/portal/blob/0.4.4/Plugin/Theme/Model/View/Design.php#L13-L33 Maybe @see \Dfe\Portal\Plugin\Store\Model\PathConfig::afterGetDefaultPath() is also an offender... https://github.com/mage2pro/portal/blob/0.4.4/Plugin/Store/Model/PathConfig.php#L7-L17 @used-by _a() @used-by _font() @used-by _matrix() @used-by v() @used-by \Df\Config\Source\WaitPeriodType::calculate() @param null|string|int|S|Store|array(string, int) $s [optional] @return null|string|int|S|Store|array(string, int)
[ "2016", "-", "03", "-", "08", "2017", "-", "10", "-", "25" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Config/Settings.php#L201-L203
42,986
mage2pro/core
Config/Settings.php
Settings._matrix
final protected function _matrix($i, $j, $k = null, $s = null, $d = null) {return dfa(dfa(dfc($this, function($k, $s) {return $this->json($k, $s) ;}, [$k ?: df_caller_f(), df_scope_code($this->scope($s))]), $i, []), $j, $d) ;}
php
final protected function _matrix($i, $j, $k = null, $s = null, $d = null) {return dfa(dfa(dfc($this, function($k, $s) {return $this->json($k, $s) ;}, [$k ?: df_caller_f(), df_scope_code($this->scope($s))]), $i, []), $j, $d) ;}
[ "final", "protected", "function", "_matrix", "(", "$", "i", ",", "$", "j", ",", "$", "k", "=", "null", ",", "$", "s", "=", "null", ",", "$", "d", "=", "null", ")", "{", "return", "dfa", "(", "dfa", "(", "dfc", "(", "$", "this", ",", "function...
2016-01-29 @param int $i Номер строки @param int $j Номер столбца @param string|null $k [optional] @param null|string|int|S|Store $s [optional] @param string|null $d [optonal] @return Font
[ "2016", "-", "01", "-", "29" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Config/Settings.php#L323-L327
42,987
mage2pro/core
StripeClone/Payer.php
Payer.customerIdSaved
private function customerIdSaved() {return dfc($this, function() {return df_ci_get( $this->m(), !($id = df_order($this->ii())->getCustomerId()) ? null : df_customer($id) );});}
php
private function customerIdSaved() {return dfc($this, function() {return df_ci_get( $this->m(), !($id = df_order($this->ii())->getCustomerId()) ? null : df_customer($id) );});}
[ "private", "function", "customerIdSaved", "(", ")", "{", "return", "dfc", "(", "$", "this", ",", "function", "(", ")", "{", "return", "df_ci_get", "(", "$", "this", "->", "m", "(", ")", ",", "!", "(", "$", "id", "=", "df_order", "(", "$", "this", ...
2016-08-23 @used-by customerId() @used-by newCard() @return string
[ "2016", "-", "08", "-", "23" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/StripeClone/Payer.php#L99-L101
42,988
mage2pro/core
Payment/W/Strategy/ConfirmPending.php
ConfirmPending._handle
protected function _handle() { $o = $this->o(); /** @var O $o */ /** * 2016-03-15 * Если оставить открытой транзакцию «capture», * то операция «void» (отмена авторизации платежа) будет недоступна: * https://github.com/magento/magento2/blob/2.1.0/app/code/Magento/Sales/Model/Order/Payment.php#L540-L555 * @used-by \Magento\Sales\Model\Order\Payment::canVoid() * Транзакция считается закрытой, если явно не указать «false». * * 2017-01-16 * Наоборот: если закрыть транзакцию типа «authorize», * то операция «Capture Online» из административного интерфейса будет недоступна: * @see \Magento\Sales\Model\Order\Payment::canCapture() * if ($authTransaction && $authTransaction->getIsClosed()) { * $orderTransaction = $this->transactionRepository->getByTransactionType( * Transaction::TYPE_ORDER, * $this->getId(), * $this->getOrder()->getId() * ); * if (!$orderTransaction) { * return false; * } * } * https://github.com/magento/magento2/blob/2.1.3/app/code/Magento/Sales/Model/Order/Payment.php#L263-L281 * «How is \Magento\Sales\Model\Order\Payment::canCapture() implemented and used?» * https://mage2.pro/t/650 * «How does Magento 2 decide whether to show the «Capture Online» dropdown * on a backend's invoice screen?»: https://mage2.pro/t/2475 */ $op = $this->op(); /** @var OP $op */ // 2017-03-29 // Сегодня заметил, что Kassa Compleet долбится несколько раз для одного и того же платежа. // Это приводило к повторному созданию invoice (второй invoice был с нулевой суммой). if (!$o->getTotalDue()) { $this->softFailure('This payment is already confirmed.'); } else { $e = $this->e(); /** @var Ev $e */ /** * 2016-07-14 * Если покупатель не смог или не захотел оплатить заказ, то мы заказ отменяем, * а затем, когда платёжная система возвратит покупателя в магазин, * то мы проверим, не отменён ли последний заказ, * и если он отменён — то восстановим корзину покупателя. * 2017-11-17 * From now on, a webhook and customer return can be the same: * "@see \Df\Payment\W\Action should optionally make the same processing * as @see \Df\Payment\CustomerReturn": https://github.com/mage2pro/core/issues/52 * * 2017-08-30 * If you want to ignore an event here, then: * 1) Return `true` from @see \Df\Payment\W\Event::isSuccessful() * 2) Return any value except \Df\Payment\W\Event::T_AUTHORIZE and \Df\Payment\W\Event::T_CAPTURE * from @see \Df\Payment\W\Event::ttCurrent(). * This value will be the current transaction suffix: * @used-by \Df\PaypalClone\W\Nav::id() * @used-by \Df\StripeClone\W\Nav::id() * so it should be unique in a payment processing cycle: * a particular payment can not have multiple transactions with the same suffix. */ if ($succ = !df_request(Operation::FAILURE) && $e->isSuccessful()) { /** @var bool $succ */ df_redirect_to_success(); if ($action = dfa([Ev::T_AUTHORIZE => AC::A, Ev::T_CAPTURE => AC::C], $e->ttCurrent())) { /** @var string|null $action */ $op->setIsTransactionClosed(AC::C === $action); /** * 2017-01-15 * $this->m()->setStore($o->getStoreId()); здесь не нужно, * потому что это делается автоматически в ядре: * @see \Magento\Sales\Model\Order\Payment\Operations\AuthorizeOperation::authorize(): * $method->setStore($order->getStoreId()); * https://github.com/magento/magento2/blob/2.1.3/app/code/Magento/Sales/Model/Order/Payment/Operations/AuthorizeOperation.php#L44 * * 2017-03-26 * Этот вызов приводит к добавлению транзакции типа $action: * https://github.com/mage2pro/core/blob/2.4.2/Payment/W/Nav.php#L100-L114 * Идентификатор и данные транзакции мы уже установили в методе @see \Df\Payment\W\Nav::op() */ dfp_action($op, $action); } $this->onSuccess(); } else { /** * 2016-07-10 * @uses \Magento\Sales\Model\Order\Payment\Transaction::TYPE_PAYMENT — * это единственная транзакции без специального назначения, * и поэтому мы можем безопасно его использовать. * 2017-01-16 * Идентификатор и данные транзакции мы уже установили в методе @see \Df\Payment\W\Nav::op() */ $op->addTransaction(T::TYPE_PAYMENT); if ($o->canCancel()) { $o->cancel(); } $ss = df_checkout_session(); /** @var Session|DfSession $ss */ /** * 2017-11-17 * Note 1. * "@see \Df\Payment\W\Action should optionally make the same processing * as @see \Df\Payment\CustomerReturn": https://github.com/mage2pro/core/issues/52 * Note 2. * I have implemented it by analowi with @see \Df\Payment\CustomerReturn::execute(): * if ($o && $o->canCancel()) { * $o->cancel()->save(); * } * $ss->restoreQuote(); * https://github.com/mage2pro/core/blob/3.3.16/Payment/CustomerReturn.php#L47-L50 * 2017-11-18 * "Implement a function to distinguish between a customer return from a PSP payment page * and a PSP webhook notification": https://github.com/mage2pro/core/issues/53 */ if ($ss->getLastRealOrderId()) { $ss->restoreQuote(); /** @var string $msg */ $msg = $this->s()->messageFailure($e->statusT(), $o->getStore()); // 2017-04-13 // @todo Надо бы здесь дополнительно сохранять в транзакции ответ ПС. // У меня-то он логируется в Sentry, но вот администратор магазина его не видит. df_order_comment($o, $msg, true, true); $this->h()->responder()->setError($msg); // 2016-05-06 // «How to redirect a customer to the checkout payment step?» // https://mage2.pro/t/1523 df_redirect_to_payment(); } } $o->save(); // 2016-08-17 // https://code.dmitry-fedyuk.com/m2e/allpay/issues/17 // Письмо отсылаем только если isSuccessful() вернуло true // (при этом не факт, что оплата уже прошла: при оффлайновом способе оплаты // isSuccessful() говорит лишь о том, что покупатель успешно выбрал оффлайновый способ оплаты, // а подтверждение платежа придёт лишь потом, через несколько дней). if ($succ) { dfp_mail($o); } // 2017-09-13 // We do not set a response here, because PayPal clones require a specific response on success. } }
php
protected function _handle() { $o = $this->o(); /** @var O $o */ /** * 2016-03-15 * Если оставить открытой транзакцию «capture», * то операция «void» (отмена авторизации платежа) будет недоступна: * https://github.com/magento/magento2/blob/2.1.0/app/code/Magento/Sales/Model/Order/Payment.php#L540-L555 * @used-by \Magento\Sales\Model\Order\Payment::canVoid() * Транзакция считается закрытой, если явно не указать «false». * * 2017-01-16 * Наоборот: если закрыть транзакцию типа «authorize», * то операция «Capture Online» из административного интерфейса будет недоступна: * @see \Magento\Sales\Model\Order\Payment::canCapture() * if ($authTransaction && $authTransaction->getIsClosed()) { * $orderTransaction = $this->transactionRepository->getByTransactionType( * Transaction::TYPE_ORDER, * $this->getId(), * $this->getOrder()->getId() * ); * if (!$orderTransaction) { * return false; * } * } * https://github.com/magento/magento2/blob/2.1.3/app/code/Magento/Sales/Model/Order/Payment.php#L263-L281 * «How is \Magento\Sales\Model\Order\Payment::canCapture() implemented and used?» * https://mage2.pro/t/650 * «How does Magento 2 decide whether to show the «Capture Online» dropdown * on a backend's invoice screen?»: https://mage2.pro/t/2475 */ $op = $this->op(); /** @var OP $op */ // 2017-03-29 // Сегодня заметил, что Kassa Compleet долбится несколько раз для одного и того же платежа. // Это приводило к повторному созданию invoice (второй invoice был с нулевой суммой). if (!$o->getTotalDue()) { $this->softFailure('This payment is already confirmed.'); } else { $e = $this->e(); /** @var Ev $e */ /** * 2016-07-14 * Если покупатель не смог или не захотел оплатить заказ, то мы заказ отменяем, * а затем, когда платёжная система возвратит покупателя в магазин, * то мы проверим, не отменён ли последний заказ, * и если он отменён — то восстановим корзину покупателя. * 2017-11-17 * From now on, a webhook and customer return can be the same: * "@see \Df\Payment\W\Action should optionally make the same processing * as @see \Df\Payment\CustomerReturn": https://github.com/mage2pro/core/issues/52 * * 2017-08-30 * If you want to ignore an event here, then: * 1) Return `true` from @see \Df\Payment\W\Event::isSuccessful() * 2) Return any value except \Df\Payment\W\Event::T_AUTHORIZE and \Df\Payment\W\Event::T_CAPTURE * from @see \Df\Payment\W\Event::ttCurrent(). * This value will be the current transaction suffix: * @used-by \Df\PaypalClone\W\Nav::id() * @used-by \Df\StripeClone\W\Nav::id() * so it should be unique in a payment processing cycle: * a particular payment can not have multiple transactions with the same suffix. */ if ($succ = !df_request(Operation::FAILURE) && $e->isSuccessful()) { /** @var bool $succ */ df_redirect_to_success(); if ($action = dfa([Ev::T_AUTHORIZE => AC::A, Ev::T_CAPTURE => AC::C], $e->ttCurrent())) { /** @var string|null $action */ $op->setIsTransactionClosed(AC::C === $action); /** * 2017-01-15 * $this->m()->setStore($o->getStoreId()); здесь не нужно, * потому что это делается автоматически в ядре: * @see \Magento\Sales\Model\Order\Payment\Operations\AuthorizeOperation::authorize(): * $method->setStore($order->getStoreId()); * https://github.com/magento/magento2/blob/2.1.3/app/code/Magento/Sales/Model/Order/Payment/Operations/AuthorizeOperation.php#L44 * * 2017-03-26 * Этот вызов приводит к добавлению транзакции типа $action: * https://github.com/mage2pro/core/blob/2.4.2/Payment/W/Nav.php#L100-L114 * Идентификатор и данные транзакции мы уже установили в методе @see \Df\Payment\W\Nav::op() */ dfp_action($op, $action); } $this->onSuccess(); } else { /** * 2016-07-10 * @uses \Magento\Sales\Model\Order\Payment\Transaction::TYPE_PAYMENT — * это единственная транзакции без специального назначения, * и поэтому мы можем безопасно его использовать. * 2017-01-16 * Идентификатор и данные транзакции мы уже установили в методе @see \Df\Payment\W\Nav::op() */ $op->addTransaction(T::TYPE_PAYMENT); if ($o->canCancel()) { $o->cancel(); } $ss = df_checkout_session(); /** @var Session|DfSession $ss */ /** * 2017-11-17 * Note 1. * "@see \Df\Payment\W\Action should optionally make the same processing * as @see \Df\Payment\CustomerReturn": https://github.com/mage2pro/core/issues/52 * Note 2. * I have implemented it by analowi with @see \Df\Payment\CustomerReturn::execute(): * if ($o && $o->canCancel()) { * $o->cancel()->save(); * } * $ss->restoreQuote(); * https://github.com/mage2pro/core/blob/3.3.16/Payment/CustomerReturn.php#L47-L50 * 2017-11-18 * "Implement a function to distinguish between a customer return from a PSP payment page * and a PSP webhook notification": https://github.com/mage2pro/core/issues/53 */ if ($ss->getLastRealOrderId()) { $ss->restoreQuote(); /** @var string $msg */ $msg = $this->s()->messageFailure($e->statusT(), $o->getStore()); // 2017-04-13 // @todo Надо бы здесь дополнительно сохранять в транзакции ответ ПС. // У меня-то он логируется в Sentry, но вот администратор магазина его не видит. df_order_comment($o, $msg, true, true); $this->h()->responder()->setError($msg); // 2016-05-06 // «How to redirect a customer to the checkout payment step?» // https://mage2.pro/t/1523 df_redirect_to_payment(); } } $o->save(); // 2016-08-17 // https://code.dmitry-fedyuk.com/m2e/allpay/issues/17 // Письмо отсылаем только если isSuccessful() вернуло true // (при этом не факт, что оплата уже прошла: при оффлайновом способе оплаты // isSuccessful() говорит лишь о том, что покупатель успешно выбрал оффлайновый способ оплаты, // а подтверждение платежа придёт лишь потом, через несколько дней). if ($succ) { dfp_mail($o); } // 2017-09-13 // We do not set a response here, because PayPal clones require a specific response on success. } }
[ "protected", "function", "_handle", "(", ")", "{", "$", "o", "=", "$", "this", "->", "o", "(", ")", ";", "/** @var O $o */", "/**\n\t\t * 2016-03-15\n\t\t * Если оставить открытой транзакцию «capture»,\n\t\t * то операция «void» (отмена авторизации платежа) будет недоступна:\n\t\t ...
2017-01-15 @override @see \Df\Payment\W\Strategy::_handle() @used-by \Df\Payment\W\Strategy::::handle()
[ "2017", "-", "01", "-", "15" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/W/Strategy/ConfirmPending.php#L27-L168
42,989
mage2pro/core
Config/FrontendModel.php
FrontendModel.render
function render(AE $element) { /** * Система использует frontend_model как одиночки: * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Block/System/Config/Form.php#L319 * А нам удобнее для каждого рисования создавать отдельный экземпляр. */ $i = clone $this; $i->_element = $element; return $i->_render(); }
php
function render(AE $element) { /** * Система использует frontend_model как одиночки: * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Block/System/Config/Form.php#L319 * А нам удобнее для каждого рисования создавать отдельный экземпляр. */ $i = clone $this; $i->_element = $element; return $i->_render(); }
[ "function", "render", "(", "AE", "$", "element", ")", "{", "/**\n\t\t * Система использует frontend_model как одиночки:\n\t\t * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Block/System/Config/Form.php#L319\n\t\t * А нам удобнее для каждого рисования создавать отдельный экз...
2015-12-15 @override @see RendererInterface::render() @used-by \Magento\Framework\Data\Form\Element\AbstractElement::getHtml() https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php#L465 @param AE $element @return string
[ "2015", "-", "12", "-", "15" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Config/FrontendModel.php#L33-L42
42,990
mage2pro/core
PaypalClone/W/Event.php
Event.statusT
final function statusT() {return ($k = $this->k_statusT()) ? $this->r($k) : dftr( $this->status(), df_module_json($this, 'statuses', false) );}
php
final function statusT() {return ($k = $this->k_statusT()) ? $this->r($k) : dftr( $this->status(), df_module_json($this, 'statuses', false) );}
[ "final", "function", "statusT", "(", ")", "{", "return", "(", "$", "k", "=", "$", "this", "->", "k_statusT", "(", ")", ")", "?", "$", "this", "->", "r", "(", "$", "k", ")", ":", "dftr", "(", "$", "this", "->", "status", "(", ")", ",", "df_mod...
2017-01-02 @override @see \Df\Payment\W\Event::statusT() @used-by \Df\Payment\W\Handler::log() @used-by \Df\Payment\W\Strategy\ConfirmPending::_handle() @return string|null
[ "2017", "-", "01", "-", "02" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/PaypalClone/W/Event.php#L135-L137
42,991
mage2pro/core
Framework/W/Result.php
Result.renderResult
function renderResult(IResponse $r) { if ($this->_code) { $r->setHttpResponseCode($this->_code); } foreach ($this->_headers as $headerData) { $r->setHeader($headerData['name'], $headerData['value'], $headerData['replace']); } $this->render($r); return null; }
php
function renderResult(IResponse $r) { if ($this->_code) { $r->setHttpResponseCode($this->_code); } foreach ($this->_headers as $headerData) { $r->setHeader($headerData['name'], $headerData['value'], $headerData['replace']); } $this->render($r); return null; }
[ "function", "renderResult", "(", "IResponse", "$", "r", ")", "{", "if", "(", "$", "this", "->", "_code", ")", "{", "$", "r", "->", "setHttpResponseCode", "(", "$", "this", "->", "_code", ")", ";", "}", "foreach", "(", "$", "this", "->", "_headers", ...
2016-08-24 Render content. @final Unable to use the PHP «final» keyword here because of the M2 code generation. @override @see \Magento\Framework\Controller\ResultInterface::renderResult() @see \Magento\Framework\Controller\AbstractResult::renderResult() @used-by \Magento\Framework\App\Http::launch(): // TODO: Temporary solution until all controllers return ResultInterface (MAGETWO-28359) if ($result instanceof ResultInterface) { $this->registry->register('use_page_cache_plugin', true, true); $result->renderResult($this->_response); } elseif ($result instanceof HttpInterface) { $this->_response = $result; } else { throw new \InvalidArgumentException('Invalid return type'); } https://github.com/magento/magento2/blob/2.2.1/lib/internal/Magento/Framework/App/Http.php#L122-L149 @param IResponse|IHttpResponse|HttpResponse $r @return null It is not used.
[ "2016", "-", "08", "-", "24", "Render", "content", "." ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/W/Result.php#L76-L85
42,992
mage2pro/core
Payment/Block/Info.php
Info.ci
final protected function ci() {return dfc($this, function() {return /** @var C $c */ /** @var string $id */ /** @var array(string => mixed) $ci */ !($c = $this->c()) || !($id = $this->ciId()) || !($ci = df_ci_get($this->m(), $c)) ? [] : dfa($ci, $id) ;});}
php
final protected function ci() {return dfc($this, function() {return /** @var C $c */ /** @var string $id */ /** @var array(string => mixed) $ci */ !($c = $this->c()) || !($id = $this->ciId()) || !($ci = df_ci_get($this->m(), $c)) ? [] : dfa($ci, $id) ;});}
[ "final", "protected", "function", "ci", "(", ")", "{", "return", "dfc", "(", "$", "this", ",", "function", "(", ")", "{", "return", "/** @var C $c */", "/** @var string $id */", "/** @var array(string => mixed) $ci */", "!", "(", "$", "c", "=", "$", "this", "-...
2018-11-16 @used-by \Dfe\TBCBank\Block\Info::cardData() @return array(string => mixed)|null
[ "2018", "-", "11", "-", "16" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Block/Info.php#L238-L242
42,993
mage2pro/core
Payment/Block/Info.php
Info.iia
final protected function iia(...$keys) {$i = $this->ii(); return !$keys ? $i->getAdditionalInformation() : ( 1 === count($keys) ? $i->getAdditionalInformation(df_first($keys)) : dfa_select_ordered($i->getAdditionalInformation(), $keys) ) ;}
php
final protected function iia(...$keys) {$i = $this->ii(); return !$keys ? $i->getAdditionalInformation() : ( 1 === count($keys) ? $i->getAdditionalInformation(df_first($keys)) : dfa_select_ordered($i->getAdditionalInformation(), $keys) ) ;}
[ "final", "protected", "function", "iia", "(", "...", "$", "keys", ")", "{", "$", "i", "=", "$", "this", "->", "ii", "(", ")", ";", "return", "!", "$", "keys", "?", "$", "i", "->", "getAdditionalInformation", "(", ")", ":", "(", "1", "===", "count...
2016-05-21 @used-by \Dfe\TwoCheckout\Block\Info::cardNumber() @used-by \Dfe\TwoCheckout\Block\Info::prepare() @param string[] ...$keys @return mixed|array(string => mixed)
[ "2016", "-", "05", "-", "21" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Block/Info.php#L343-L349
42,994
mage2pro/core
Payment/Block/Info.php
Info.siEx
final protected function siEx($k, $v = null) { if ($this->extended()) { $this->si($k, $v); } }
php
final protected function siEx($k, $v = null) { if ($this->extended()) { $this->si($k, $v); } }
[ "final", "protected", "function", "siEx", "(", "$", "k", ",", "$", "v", "=", "null", ")", "{", "if", "(", "$", "this", "->", "extended", "(", ")", ")", "{", "$", "this", "->", "si", "(", "$", "k", ",", "$", "v", ")", ";", "}", "}" ]
2016-11-17 @used-by siID() @used-by \Df\GingerPaymentsBase\Block\Info::prepare() @used-by \Df\StripeClone\Block\Info::prepare() @used-by \Dfe\AllPay\Block\Info::prepare() @used-by \Dfe\AlphaCommerceHub\Block\Info::prepare() @used-by \Dfe\AlphaCommerceHub\Block\Info::prepare() @used-by \Dfe\IPay88\Block\Info::prepare() @used-by \Dfe\PostFinance\Block\Info::prepare() @used-by \Dfe\SecurePay\Block\Info::prepare() @used-by \Dfe\TBCBank\Block\Info::prepare() @used-by \Dfe\TwoCheckout\Block\Info::prepare() @param string|Phrase|null|array(string => string) $k @param string|null $v [optional]
[ "2016", "-", "11", "-", "17" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Block/Info.php#L588-L592
42,995
mage2pro/core
Payment/Block/Info.php
Info.siID
final protected function siID() {return $this->siEx( $this->transIDLabel(), $this->m()->tidFormat($this->tm()->tReq(), true) );}
php
final protected function siID() {return $this->siEx( $this->transIDLabel(), $this->m()->tidFormat($this->tm()->tReq(), true) );}
[ "final", "protected", "function", "siID", "(", ")", "{", "return", "$", "this", "->", "siEx", "(", "$", "this", "->", "transIDLabel", "(", ")", ",", "$", "this", "->", "m", "(", ")", "->", "tidFormat", "(", "$", "this", "->", "tm", "(", ")", "->"...
2017-03-29 @used-by \Df\GingerPaymentsBase\Block\Info::prepareCommon() @used-by \Df\StripeClone\Block\Info::prepare()
[ "2017", "-", "03", "-", "29" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Block/Info.php#L599-L601
42,996
mage2pro/core
Payment/Block/Info.php
Info.rTable
private function rTable() {return !$this->dic()->count() ? '' : df_tag('table', !df_is_backend() ? 'data table' : df_cc_s( 'data-table admin__table-secondary df-payment-info', $this->ii('method') ) ,df_cc_n(df_map($this->dic(), function(Entry $e) {return df_tag('tr', [], !$e->name() ? df_tag('td', ['colspan' => 2], $e->value()) : // 2017-07-19 // The previous code for the second argument was: $b ? [] : ['scope' => 'row']. // It was ported from the core. // But it looks like `scope=row` is not used anywhere. df_tag('th', [], $e->name()) . df_tag('td', [], $e->value()) ) ;})) );}
php
private function rTable() {return !$this->dic()->count() ? '' : df_tag('table', !df_is_backend() ? 'data table' : df_cc_s( 'data-table admin__table-secondary df-payment-info', $this->ii('method') ) ,df_cc_n(df_map($this->dic(), function(Entry $e) {return df_tag('tr', [], !$e->name() ? df_tag('td', ['colspan' => 2], $e->value()) : // 2017-07-19 // The previous code for the second argument was: $b ? [] : ['scope' => 'row']. // It was ported from the core. // But it looks like `scope=row` is not used anywhere. df_tag('th', [], $e->name()) . df_tag('td', [], $e->value()) ) ;})) );}
[ "private", "function", "rTable", "(", ")", "{", "return", "!", "$", "this", "->", "dic", "(", ")", "->", "count", "(", ")", "?", "''", ":", "df_tag", "(", "'table'", ",", "!", "df_is_backend", "(", ")", "?", "'data table'", ":", "df_cc_s", "(", "'d...
2017-03-25 @used-by _toHtml() @return string
[ "2017", "-", "03", "-", "25" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Block/Info.php#L720-L734
42,997
mage2pro/core
Sso/Css.php
Css._toHtml
final protected function _toHtml() { $hhl = df_style_inline_hide('.header.links', '#switcher-currency'); /** @var string $hhl */ return self::isAccConfirmation() ? $hhl . df_style_inline_hide('.login-container') : (self::isRegCompletion() ? $hhl . df_js(__CLASS__, 'reg-completion') : '') ;}
php
final protected function _toHtml() { $hhl = df_style_inline_hide('.header.links', '#switcher-currency'); /** @var string $hhl */ return self::isAccConfirmation() ? $hhl . df_style_inline_hide('.login-container') : (self::isRegCompletion() ? $hhl . df_js(__CLASS__, 'reg-completion') : '') ;}
[ "final", "protected", "function", "_toHtml", "(", ")", "{", "$", "hhl", "=", "df_style_inline_hide", "(", "'.header.links'", ",", "'#switcher-currency'", ")", ";", "/** @var string $hhl */", "return", "self", "::", "isAccConfirmation", "(", ")", "?", "$", "hhl", ...
2016-12-04 @override @see _P::_toHtml() @used-by _P::toHtml(): $html = $this->_loadCache(); if ($html === false) { if ($this->hasData('translate_inline')) { $this->inlineTranslation->suspend($this->getData('translate_inline')); } $this->_beforeToHtml(); $html = $this->_toHtml(); $this->_saveCache($html); if ($this->hasData('translate_inline')) { $this->inlineTranslation->resume(); } } $html = $this->_afterToHtml($html); https://github.com/magento/magento2/blob/2.2.0/lib/internal/Magento/Framework/View/Element/AbstractBlock.php#L643-L689 @return string
[ "2016", "-", "12", "-", "04" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Sso/Css.php#L33-L37
42,998
mage2pro/core
Payment/Currency.php
Currency.f
final static function f($m) {return dfcf(function(M $m) { /** @var self $i */ $i = df_new(df_con_heir($m, __CLASS__)); $i->_m = $m; return $i; }, [dfpm($m)]);}
php
final static function f($m) {return dfcf(function(M $m) { /** @var self $i */ $i = df_new(df_con_heir($m, __CLASS__)); $i->_m = $m; return $i; }, [dfpm($m)]);}
[ "final", "static", "function", "f", "(", "$", "m", ")", "{", "return", "dfcf", "(", "function", "(", "M", "$", "m", ")", "{", "/** @var self $i */", "$", "i", "=", "df_new", "(", "df_con_heir", "(", "$", "m", ",", "__CLASS__", ")", ")", ";", "$", ...
2017-10-12 @used-by dfp_currency() @param object|string $m @return self
[ "2017", "-", "10", "-", "12" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Payment/Currency.php#L151-L153
42,999
mage2pro/core
Framework/Form/Element/Url.php
Url.getElementHtml
function getElementHtml() {return df_tag('div', ['class' => 'df-url', 'id' => $this->getId()], $this->thirdPartyLocalhost() ? $this->messageForThirdPartyLocalhost() : $this->messageForOthers() );}
php
function getElementHtml() {return df_tag('div', ['class' => 'df-url', 'id' => $this->getId()], $this->thirdPartyLocalhost() ? $this->messageForThirdPartyLocalhost() : $this->messageForOthers() );}
[ "function", "getElementHtml", "(", ")", "{", "return", "df_tag", "(", "'div'", ",", "[", "'class'", "=>", "'df-url'", ",", "'id'", "=>", "$", "this", "->", "getId", "(", ")", "]", ",", "$", "this", "->", "thirdPartyLocalhost", "(", ")", "?", "$", "th...
2016-05-30 2016-06-07 @final Unable to use the PHP «final» keyword here because of the M2 code generation. 'id' => $this->getId() нужно для совместимости с 2.0.6, иначе там сбой в выражении inputs = $(idTo).up(this._config.levels_up) https://mail.google.com/mail/u/0/#search/maged%40wrapco.com.au/15510135c446afdb @override @see \Magento\Framework\Data\Form\Element\AbstractElement::getElementHtml() @used-by \Magento\Framework\Data\Form\Element\AbstractElement::getDefaultHtml(): public function getDefaultHtml() { $html = $this->getData('default_html'); if ($html === null) { $html = $this->getNoSpan() === true ? '' : '<div class="admin__field">' . "\n"; $html .= $this->getLabelHtml(); $html .= $this->getElementHtml(); $html .= $this->getNoSpan() === true ? '' : '</div>' . "\n"; } return $html; } https://github.com/magento/magento2/blob/2.2.0-RC1.8/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php#L426-L441 @return string
[ "2016", "-", "05", "-", "30", "2016", "-", "06", "-", "07" ]
e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f
https://github.com/mage2pro/core/blob/e04c31bb8a91376df2c2c8a9b29dbad5e8f0cc3f/Framework/Form/Element/Url.php#L48-L50