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
24,700
CrunchPHP/fastcgi
src/Protocol/Role.php
Role.instance
public static function instance($role) { // @codeCoverageIgnoreStart if (!self::$instances) { self::$instances = [ self::RESPONDER => new self(self::RESPONDER), self::AUTHORIZER => new self(self::AUTHORIZER), self::FILTER => new self(s...
php
public static function instance($role) { // @codeCoverageIgnoreStart if (!self::$instances) { self::$instances = [ self::RESPONDER => new self(self::RESPONDER), self::AUTHORIZER => new self(self::AUTHORIZER), self::FILTER => new self(s...
[ "public", "static", "function", "instance", "(", "$", "role", ")", "{", "// @codeCoverageIgnoreStart", "if", "(", "!", "self", "::", "$", "instances", ")", "{", "self", "::", "$", "instances", "=", "[", "self", "::", "RESPONDER", "=>", "new", "self", "("...
Returns an instance of the given role. @param int $role @throws \InvalidArgumentException @return Role
[ "Returns", "an", "instance", "of", "the", "given", "role", "." ]
102437193e67e5a841ec5a897549ec345788d1bd
https://github.com/CrunchPHP/fastcgi/blob/102437193e67e5a841ec5a897549ec345788d1bd/src/Protocol/Role.php#L46-L63
24,701
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.config
public function config( $eid, $secret, $country, $language, $currency, $mode = Klarna::LIVE, $pcStorage = 'json', $pcURI = 'pclasses.json', $ssl = true ) { try { KlarnaConfig::$store = false; $this->config = new KlarnaConfig(null); $this->config['...
php
public function config( $eid, $secret, $country, $language, $currency, $mode = Klarna::LIVE, $pcStorage = 'json', $pcURI = 'pclasses.json', $ssl = true ) { try { KlarnaConfig::$store = false; $this->config = new KlarnaConfig(null); $this->config['...
[ "public", "function", "config", "(", "$", "eid", ",", "$", "secret", ",", "$", "country", ",", "$", "language", ",", "$", "currency", ",", "$", "mode", "=", "Klarna", "::", "LIVE", ",", "$", "pcStorage", "=", "'json'", ",", "$", "pcURI", "=", "'pcl...
Method of ease for setting common config fields. The storage module for PClasses:<br> Use 'xml' for xmlstorage.class.php.<br> Use 'mysql' for mysqlstorage.class.php.<br> Use 'json' for jsonstorage.class.php.<br> The storage URI for PClasses:<br> Use the absolute or relative URI to a file if {@link Klarna::$pcStorage}...
[ "Method", "of", "ease", "for", "setting", "common", "config", "fields", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L580-L607
24,702
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.setConfig
public function setConfig(&$config) { $this->_checkConfig($config); $this->config = $config; $this->init(); }
php
public function setConfig(&$config) { $this->_checkConfig($config); $this->config = $config; $this->init(); }
[ "public", "function", "setConfig", "(", "&", "$", "config", ")", "{", "$", "this", "->", "_checkConfig", "(", "$", "config", ")", ";", "$", "this", "->", "config", "=", "$", "config", ";", "$", "this", "->", "init", "(", ")", ";", "}" ]
Sets and initializes this Klarna object using the supplied config object. @param KlarnaConfig &$config Config object. @see KlarnaConfig @throws KlarnaException @return void
[ "Sets", "and", "initializes", "this", "Klarna", "object", "using", "the", "supplied", "config", "object", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L618-L624
24,703
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.setCountry
public function setCountry($country) { if (!is_numeric($country) && (strlen($country) == 2 || strlen($country) == 3) ) { $country = KlarnaCountry::fromCode($country); } $this->_checkCountry($country); $this->_country = $country; }
php
public function setCountry($country) { if (!is_numeric($country) && (strlen($country) == 2 || strlen($country) == 3) ) { $country = KlarnaCountry::fromCode($country); } $this->_checkCountry($country); $this->_country = $country; }
[ "public", "function", "setCountry", "(", "$", "country", ")", "{", "if", "(", "!", "is_numeric", "(", "$", "country", ")", "&&", "(", "strlen", "(", "$", "country", ")", "==", "2", "||", "strlen", "(", "$", "country", ")", "==", "3", ")", ")", "{...
Sets the country used. <b>Note</b>:<br> If you input 'dk', 'fi', 'de', 'nl', 'no' or 'se', <br> then currency and language will be set to mirror that country.<br> @param string|int $country {@link KlarnaCountry} @see KlarnaCountry @throws KlarnaException @return void
[ "Sets", "the", "country", "used", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L712-L721
24,704
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.getCountryCode
public function getCountryCode($country = null) { if ($country === null) { $country = $this->_country; } $code = KlarnaCountry::getCode($country); return (string) $code; }
php
public function getCountryCode($country = null) { if ($country === null) { $country = $this->_country; } $code = KlarnaCountry::getCode($country); return (string) $code; }
[ "public", "function", "getCountryCode", "(", "$", "country", "=", "null", ")", "{", "if", "(", "$", "country", "===", "null", ")", "{", "$", "country", "=", "$", "this", "->", "_country", ";", "}", "$", "code", "=", "KlarnaCountry", "::", "getCode", ...
Returns the country code for the set country constant. @param int $country {@link KlarnaCountry Country} constant. @return string Two letter code, e.g. "se", "no", etc.
[ "Returns", "the", "country", "code", "for", "the", "set", "country", "constant", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L730-L738
24,705
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.setLanguage
public function setLanguage($language) { if (!is_numeric($language) && strlen($language) == 2) { $this->setLanguage(self::getLanguageForCode($language)); } else { $this->_checkLanguage($language); $this->_language = $language; } }
php
public function setLanguage($language) { if (!is_numeric($language) && strlen($language) == 2) { $this->setLanguage(self::getLanguageForCode($language)); } else { $this->_checkLanguage($language); $this->_language = $language; } }
[ "public", "function", "setLanguage", "(", "$", "language", ")", "{", "if", "(", "!", "is_numeric", "(", "$", "language", ")", "&&", "strlen", "(", "$", "language", ")", "==", "2", ")", "{", "$", "this", "->", "setLanguage", "(", "self", "::", "getLan...
Sets the language used. <b>Note</b>:<br> You can use the two letter language code instead of the constant.<br> E.g. 'da' instead of using {@link KlarnaLanguage::DA}.<br> @param string|int $language {@link KlarnaLanguage} @see KlarnaLanguage @throws KlarnaException @return void
[ "Sets", "the", "language", "used", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L781-L789
24,706
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.getLanguageCode
public function getLanguageCode($language = null) { if ($language === null) { $language = $this->_language; } $code = KlarnaLanguage::getCode($language); return (string) $code; }
php
public function getLanguageCode($language = null) { if ($language === null) { $language = $this->_language; } $code = KlarnaLanguage::getCode($language); return (string) $code; }
[ "public", "function", "getLanguageCode", "(", "$", "language", "=", "null", ")", "{", "if", "(", "$", "language", "===", "null", ")", "{", "$", "language", "=", "$", "this", "->", "_language", ";", "}", "$", "code", "=", "KlarnaLanguage", "::", "getCod...
Returns the language code for the set language constant. @param int $language {@link KlarnaLanguage Language} constant. @return string Two letter code, e.g. "da", "de", etc.
[ "Returns", "the", "language", "code", "for", "the", "set", "language", "constant", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L798-L806
24,707
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.setCurrency
public function setCurrency($currency) { if (!is_numeric($currency) && strlen($currency) == 3) { $this->setCurrency(self::getCurrencyForCode($currency)); } else { $this->_checkCurrency($currency); $this->_currency = $currency; } }
php
public function setCurrency($currency) { if (!is_numeric($currency) && strlen($currency) == 3) { $this->setCurrency(self::getCurrencyForCode($currency)); } else { $this->_checkCurrency($currency); $this->_currency = $currency; } }
[ "public", "function", "setCurrency", "(", "$", "currency", ")", "{", "if", "(", "!", "is_numeric", "(", "$", "currency", ")", "&&", "strlen", "(", "$", "currency", ")", "==", "3", ")", "{", "$", "this", "->", "setCurrency", "(", "self", "::", "getCur...
Sets the currency used. <b>Note</b>:<br> You can use the three letter shortening of the currency.<br> E.g. "dkk", "eur", "nok" or "sek" instead of the constant.<br> @param string|int $currency {@link KlarnaCurrency} @see KlarnaCurrency @throws KlarnaException @return void
[ "Sets", "the", "currency", "used", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L850-L858
24,708
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.getCurrencyCode
public function getCurrencyCode($currency = null) { if ($currency === null) { $currency = $this->_currency; } $code = KlarnaCurrency::getCode($currency); return (string) $code; }
php
public function getCurrencyCode($currency = null) { if ($currency === null) { $currency = $this->_currency; } $code = KlarnaCurrency::getCode($currency); return (string) $code; }
[ "public", "function", "getCurrencyCode", "(", "$", "currency", "=", "null", ")", "{", "if", "(", "$", "currency", "===", "null", ")", "{", "$", "currency", "=", "$", "this", "->", "_currency", ";", "}", "$", "code", "=", "KlarnaCurrency", "::", "getCod...
Returns the the currency code for the set currency constant. @param int $currency {@link KlarnaCurrency Currency} constant. @return string Three letter currency code.
[ "Returns", "the", "the", "currency", "code", "for", "the", "set", "currency", "constant", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L885-L893
24,709
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.setSessionID
public function setSessionID($name, $sid) { $this->_checkArgument($name, "name"); $this->_checkArgument($sid, "sid"); $this->sid[$name] = $sid; }
php
public function setSessionID($name, $sid) { $this->_checkArgument($name, "name"); $this->_checkArgument($sid, "sid"); $this->sid[$name] = $sid; }
[ "public", "function", "setSessionID", "(", "$", "name", ",", "$", "sid", ")", "{", "$", "this", "->", "_checkArgument", "(", "$", "name", ",", "\"name\"", ")", ";", "$", "this", "->", "_checkArgument", "(", "$", "sid", ",", "\"sid\"", ")", ";", "$", ...
Sets the session id's for various device identification, behaviour identification software. <b>Available named session id's</b>:<br> string - dev_id_1<br> string - dev_id_2<br> string - dev_id_3<br> string - beh_id_1<br> string - beh_id_2<br> string - beh_id_3<br> @param string $name Session ID identifier, e.g. 'dev_...
[ "Sets", "the", "session", "id", "s", "for", "various", "device", "identification", "behaviour", "identification", "software", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L964-L970
24,710
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.getClientIP
public function getClientIP() { if (isset($this->clientIP)) { return $this->clientIP; } $tmp_ip = ''; $x_fwd = null; //Proxy handling. if (array_key_exists('REMOTE_ADDR', $_SERVER)) { $tmp_ip = $_SERVER['REMOTE_ADDR']; } if (...
php
public function getClientIP() { if (isset($this->clientIP)) { return $this->clientIP; } $tmp_ip = ''; $x_fwd = null; //Proxy handling. if (array_key_exists('REMOTE_ADDR', $_SERVER)) { $tmp_ip = $_SERVER['REMOTE_ADDR']; } if (...
[ "public", "function", "getClientIP", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "clientIP", ")", ")", "{", "return", "$", "this", "->", "clientIP", ";", "}", "$", "tmp_ip", "=", "''", ";", "$", "x_fwd", "=", "null", ";", "//Proxy ha...
Returns the clients IP address. @return string
[ "Returns", "the", "clients", "IP", "address", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1141-L1165
24,711
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.setAddress
public function setAddress($type, $addr) { if (!($addr instanceof KlarnaAddr)) { throw new Klarna_InvalidKlarnaAddrException; } if ($addr->isCompany === null) { $addr->isCompany = false; } if ($type === KlarnaFlags::IS_SHIPPING) { $this->...
php
public function setAddress($type, $addr) { if (!($addr instanceof KlarnaAddr)) { throw new Klarna_InvalidKlarnaAddrException; } if ($addr->isCompany === null) { $addr->isCompany = false; } if ($type === KlarnaFlags::IS_SHIPPING) { $this->...
[ "public", "function", "setAddress", "(", "$", "type", ",", "$", "addr", ")", "{", "if", "(", "!", "(", "$", "addr", "instanceof", "KlarnaAddr", ")", ")", "{", "throw", "new", "Klarna_InvalidKlarnaAddrException", ";", "}", "if", "(", "$", "addr", "->", ...
Sets the specified address for the current order. <b>Address type can be</b>:<br> {@link KlarnaFlags::IS_SHIPPING}<br> {@link KlarnaFlags::IS_BILLING}<br> @param int $type Address type. @param KlarnaAddr $addr Specified address. @throws KlarnaException @return void
[ "Sets", "the", "specified", "address", "for", "the", "current", "order", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1180-L1202
24,712
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.addArticle
public function addArticle( $qty, $artNo, $title, $price, $vat, $discount = 0, $flags = KlarnaFlags::INC_VAT ) { $this->_checkQty($qty); // Either artno or title has to be set if ((($artNo === null ) || ($artNo == "")) && (($title === null ) || ($title == "")) ...
php
public function addArticle( $qty, $artNo, $title, $price, $vat, $discount = 0, $flags = KlarnaFlags::INC_VAT ) { $this->_checkQty($qty); // Either artno or title has to be set if ((($artNo === null ) || ($artNo == "")) && (($title === null ) || ($title == "")) ...
[ "public", "function", "addArticle", "(", "$", "qty", ",", "$", "artNo", ",", "$", "title", ",", "$", "price", ",", "$", "vat", ",", "$", "discount", "=", "0", ",", "$", "flags", "=", "KlarnaFlags", "::", "INC_VAT", ")", "{", "$", "this", "->", "_...
Adds an article to the current goods list for the current order. <b>Note</b>:<br> It is recommended that you use {@link KlarnaFlags::INC_VAT}.<br> <b>Flags can be</b>:<br> {@link KlarnaFlags::INC_VAT}<br> {@link KlarnaFlags::IS_SHIPMENT}<br> {@link KlarnaFlags::IS_HANDLING}<br> {@link KlarnaFlags::PRINT_1000}<br> {@l...
[ "Adds", "an", "article", "to", "the", "current", "goods", "list", "for", "the", "current", "order", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1491-L1536
24,713
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.summarizeGoodsList
public function summarizeGoodsList() { $amount = 0; if (!is_array($this->goodsList)) { return $amount; } foreach ($this->goodsList as $goods) { $price = $goods['goods']['price']; // Add VAT if price is Excluding VAT if (($goods['goods'...
php
public function summarizeGoodsList() { $amount = 0; if (!is_array($this->goodsList)) { return $amount; } foreach ($this->goodsList as $goods) { $price = $goods['goods']['price']; // Add VAT if price is Excluding VAT if (($goods['goods'...
[ "public", "function", "summarizeGoodsList", "(", ")", "{", "$", "amount", "=", "0", ";", "if", "(", "!", "is_array", "(", "$", "this", "->", "goodsList", ")", ")", "{", "return", "$", "amount", ";", "}", "foreach", "(", "$", "this", "->", "goodsList"...
Summarizes the prices of the held goods list @return int total amount
[ "Summarizes", "the", "prices", "of", "the", "held", "goods", "list" ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1800-L1824
24,714
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.cancelReservation
public function cancelReservation($rno) { $this->_checkRNO($rno); $digestSecret = self::digest( $this->colon($this->_eid, $rno, $this->_secret) ); $paramList = array( $rno, $this->_eid, $digestSecret ); self::printDebu...
php
public function cancelReservation($rno) { $this->_checkRNO($rno); $digestSecret = self::digest( $this->colon($this->_eid, $rno, $this->_secret) ); $paramList = array( $rno, $this->_eid, $digestSecret ); self::printDebu...
[ "public", "function", "cancelReservation", "(", "$", "rno", ")", "{", "$", "this", "->", "_checkRNO", "(", "$", "rno", ")", ";", "$", "digestSecret", "=", "self", "::", "digest", "(", "$", "this", "->", "colon", "(", "$", "this", "->", "_eid", ",", ...
Cancels a reservation. @param string $rno Reservation number. @throws KlarnaException @return bool True, if the cancellation was successful.
[ "Cancels", "a", "reservation", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1996-L2014
24,715
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.changeReservation
public function changeReservation( $rno, $amount, $flags = KlarnaFlags::NEW_AMOUNT ) { $this->_checkRNO($rno); $this->_checkAmount($amount); $this->_checkInt($flags, 'flags'); $digestSecret = self::digest( $this->colon($this->_eid, $rno, $amount, $this->_secret) ...
php
public function changeReservation( $rno, $amount, $flags = KlarnaFlags::NEW_AMOUNT ) { $this->_checkRNO($rno); $this->_checkAmount($amount); $this->_checkInt($flags, 'flags'); $digestSecret = self::digest( $this->colon($this->_eid, $rno, $amount, $this->_secret) ...
[ "public", "function", "changeReservation", "(", "$", "rno", ",", "$", "amount", ",", "$", "flags", "=", "KlarnaFlags", "::", "NEW_AMOUNT", ")", "{", "$", "this", "->", "_checkRNO", "(", "$", "rno", ")", ";", "$", "this", "->", "_checkAmount", "(", "$",...
Changes specified reservation to a new amount. <b>Flags can be either of these</b>:<br> {@link KlarnaFlags::NEW_AMOUNT}<br> {@link KlarnaFlags::ADD_AMOUNT}<br> @param string $rno Reservation number. @param int $amount Amount including VAT. @param int $flags Options which affect the behaviour. @throws Klar...
[ "Changes", "specified", "reservation", "to", "a", "new", "amount", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2031-L2054
24,716
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.update
public function update($rno, $clear = true) { $rno = strval($rno); // All info that is sent in is part of the digest secret, in this order: // [ // proto_vsn, client_vsn, eid, rno, careof, street, zip, city, // country, fname, lname, careof, street, zip, city, coun...
php
public function update($rno, $clear = true) { $rno = strval($rno); // All info that is sent in is part of the digest secret, in this order: // [ // proto_vsn, client_vsn, eid, rno, careof, street, zip, city, // country, fname, lname, careof, street, zip, city, coun...
[ "public", "function", "update", "(", "$", "rno", ",", "$", "clear", "=", "true", ")", "{", "$", "rno", "=", "strval", "(", "$", "rno", ")", ";", "// All info that is sent in is part of the digest secret, in this order:", "// [", "// proto_vsn, client_vsn, eid, rn...
Update the reservation matching the given reservation number. @param string $rno Reservation number @param boolean $clear clear set data aftre updating. Defaulted to true. @throws KlarnaException if no RNO is given, or if an error is recieved from Klarna Online. @return true if the update was successful
[ "Update", "the", "reservation", "matching", "the", "given", "reservation", "number", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2067-L2142
24,717
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna._addressDigestPart
private function _addressDigestPart(KlarnaAddr $address = null) { if ($address === null) { return array(); } $keyOrder = array( 'careof', 'street', 'zip', 'city', 'country', 'fname', 'lname' ); $holder = $address->toArray(); $digest = array()...
php
private function _addressDigestPart(KlarnaAddr $address = null) { if ($address === null) { return array(); } $keyOrder = array( 'careof', 'street', 'zip', 'city', 'country', 'fname', 'lname' ); $holder = $address->toArray(); $digest = array()...
[ "private", "function", "_addressDigestPart", "(", "KlarnaAddr", "$", "address", "=", "null", ")", "{", "if", "(", "$", "address", "===", "null", ")", "{", "return", "array", "(", ")", ";", "}", "$", "keyOrder", "=", "array", "(", "'careof'", ",", "'str...
Help function to sort the address for update digest. @param KlarnaAddr|null $address KlarnaAddr object or null @return array
[ "Help", "function", "to", "sort", "the", "address", "for", "update", "digest", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2151-L2171
24,718
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.activate
public function activate( $rno, $ocr = null, $flags = null, $clear = true ) { $this->_checkRNO($rno); // Overwrite any OCR set on activateInfo if supplied here since this // method call is more specific. if ($ocr !== null) { $this->setActivateInfo('ocr', $ocr); ...
php
public function activate( $rno, $ocr = null, $flags = null, $clear = true ) { $this->_checkRNO($rno); // Overwrite any OCR set on activateInfo if supplied here since this // method call is more specific. if ($ocr !== null) { $this->setActivateInfo('ocr', $ocr); ...
[ "public", "function", "activate", "(", "$", "rno", ",", "$", "ocr", "=", "null", ",", "$", "flags", "=", "null", ",", "$", "clear", "=", "true", ")", "{", "$", "this", "->", "_checkRNO", "(", "$", "rno", ")", ";", "// Overwrite any OCR set on activateI...
Activate the reservation matching the given reservation number. Optional information should be set in ActivateInfo. To perform a partial activation, use the addArtNo function to specify which items in the reservation to include in the activation. @param string $rno Reservation number @param string $ocr optional...
[ "Activate", "the", "reservation", "matching", "the", "given", "reservation", "number", ".", "Optional", "information", "should", "be", "set", "in", "ActivateInfo", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2191-L2290
24,719
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.activateReservation
public function activateReservation( $pno, $rno, $gender, $ocr = "", $flags = KlarnaFlags::NO_FLAG, $pclass = KlarnaPClass::INVOICE, $encoding = null, $clear = true ) { $this->_checkLocale(); //Get the PNO/SSN encoding constant. if ($encoding === null) { $encodin...
php
public function activateReservation( $pno, $rno, $gender, $ocr = "", $flags = KlarnaFlags::NO_FLAG, $pclass = KlarnaPClass::INVOICE, $encoding = null, $clear = true ) { $this->_checkLocale(); //Get the PNO/SSN encoding constant. if ($encoding === null) { $encodin...
[ "public", "function", "activateReservation", "(", "$", "pno", ",", "$", "rno", ",", "$", "gender", ",", "$", "ocr", "=", "\"\"", ",", "$", "flags", "=", "KlarnaFlags", "::", "NO_FLAG", ",", "$", "pclass", "=", "KlarnaPClass", "::", "INVOICE", ",", "$",...
Activates a previously created reservation. <b>This method returns an array with</b>:<br> Risk status ("no_risk", "ok")<br> Invoice number<br> Gender is only required for Germany and Netherlands.<br> Use of the OCR parameter is optional. An OCR number can be retrieved by using: {@link Klarna::reserveOCR()}. <b>Flag...
[ "Activates", "a", "previously", "created", "reservation", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2337-L2430
24,720
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.splitReservation
public function splitReservation( $rno, $amount, $flags = KlarnaFlags::NO_FLAG ) { //Check so required information is set. $this->_checkRNO($rno); $this->_checkAmount($amount); if ($amount <= 0) { throw new Klarna_InvalidPriceException($amount); } ...
php
public function splitReservation( $rno, $amount, $flags = KlarnaFlags::NO_FLAG ) { //Check so required information is set. $this->_checkRNO($rno); $this->_checkAmount($amount); if ($amount <= 0) { throw new Klarna_InvalidPriceException($amount); } ...
[ "public", "function", "splitReservation", "(", "$", "rno", ",", "$", "amount", ",", "$", "flags", "=", "KlarnaFlags", "::", "NO_FLAG", ")", "{", "//Check so required information is set.", "$", "this", "->", "_checkRNO", "(", "$", "rno", ")", ";", "$", "this"...
Splits a reservation due to for example outstanding articles. <b>For flags usage see</b>:<br> {@link Klarna::reserveAmount()}<br> @param string $rno Reservation number. @param int $amount The amount to be subtracted from the reservation. @param int $flags Options which affect the behaviour. @throws Klarna...
[ "Splits", "a", "reservation", "due", "to", "for", "example", "outstanding", "articles", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2447-L2478
24,721
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.activatePart
public function activatePart( $invNo, $pclass = KlarnaPClass::INVOICE, $clear = true ) { $this->_checkInvNo($invNo); $this->_checkArtNos($this->artNos); self::printDebug('activate_part artNos array', $this->artNos); //function activate_part_digest $string = $this->_...
php
public function activatePart( $invNo, $pclass = KlarnaPClass::INVOICE, $clear = true ) { $this->_checkInvNo($invNo); $this->_checkArtNos($this->artNos); self::printDebug('activate_part artNos array', $this->artNos); //function activate_part_digest $string = $this->_...
[ "public", "function", "activatePart", "(", "$", "invNo", ",", "$", "pclass", "=", "KlarnaPClass", "::", "INVOICE", ",", "$", "clear", "=", "true", ")", "{", "$", "this", "->", "_checkInvNo", "(", "$", "invNo", ")", ";", "$", "this", "->", "_checkArtNos...
Partially activates a passive invoice. Returned array contains index "url" and "invno".<br> The value of "url" is a URL pointing to a temporary PDF-version of the activated invoice.<br> The value of "invno" is either 0 if the entire invoice was activated or the number on the new passive invoice.<br> <b>Note</b>:<br> ...
[ "Partially", "activates", "a", "passive", "invoice", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2607-L2643
24,722
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.invoiceAmount
public function invoiceAmount($invNo) { $this->_checkInvNo($invNo); $digestSecret = self::digest( $this->colon($this->_eid, $invNo, $this->_secret) ); $paramList = array( $this->_eid, $invNo, $digestSecret ); self::pr...
php
public function invoiceAmount($invNo) { $this->_checkInvNo($invNo); $digestSecret = self::digest( $this->colon($this->_eid, $invNo, $this->_secret) ); $paramList = array( $this->_eid, $invNo, $digestSecret ); self::pr...
[ "public", "function", "invoiceAmount", "(", "$", "invNo", ")", "{", "$", "this", "->", "_checkInvNo", "(", "$", "invNo", ")", ";", "$", "digestSecret", "=", "self", "::", "digest", "(", "$", "this", "->", "colon", "(", "$", "this", "->", "_eid", ",",...
Retrieves the total amount for an active invoice. @param string $invNo Invoice number. @throws KlarnaException @return float The total amount.
[ "Retrieves", "the", "total", "amount", "for", "an", "active", "invoice", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2654-L2674
24,723
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.updateOrderNo
public function updateOrderNo($invNo, $orderid) { $this->_checkInvNo($invNo); $this->_checkEstoreOrderNo($orderid); $digestSecret = self::digest( $this->colon($invNo, $orderid, $this->_secret) ); $paramList = array( $this->_eid, $digestSe...
php
public function updateOrderNo($invNo, $orderid) { $this->_checkInvNo($invNo); $this->_checkEstoreOrderNo($orderid); $digestSecret = self::digest( $this->colon($invNo, $orderid, $this->_secret) ); $paramList = array( $this->_eid, $digestSe...
[ "public", "function", "updateOrderNo", "(", "$", "invNo", ",", "$", "orderid", ")", "{", "$", "this", "->", "_checkInvNo", "(", "$", "invNo", ")", ";", "$", "this", "->", "_checkEstoreOrderNo", "(", "$", "orderid", ")", ";", "$", "digestSecret", "=", "...
Changes the order number of a purchase that was set when the order was made online. @param string $invNo Invoice number. @param string $orderid Estores order number. @throws KlarnaException @return string Invoice number.
[ "Changes", "the", "order", "number", "of", "a", "purchase", "that", "was", "set", "when", "the", "order", "was", "made", "online", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2687-L2708
24,724
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.creditInvoice
public function creditInvoice($invNo, $credNo = "") { $this->_checkInvNo($invNo); $this->_checkCredNo($credNo); $digestSecret = self::digest( $this->colon($this->_eid, $invNo, $this->_secret) ); $paramList = array( $this->_eid, $invNo, ...
php
public function creditInvoice($invNo, $credNo = "") { $this->_checkInvNo($invNo); $this->_checkCredNo($credNo); $digestSecret = self::digest( $this->colon($this->_eid, $invNo, $this->_secret) ); $paramList = array( $this->_eid, $invNo, ...
[ "public", "function", "creditInvoice", "(", "$", "invNo", ",", "$", "credNo", "=", "\"\"", ")", "{", "$", "this", "->", "_checkInvNo", "(", "$", "invNo", ")", ";", "$", "this", "->", "_checkCredNo", "(", "$", "credNo", ")", ";", "$", "digestSecret", ...
Performs a complete refund on an invoice, part payment and mobile purchase. @param string $invNo Invoice number. @param string $credNo Credit number. @throws KlarnaException @return string Invoice number.
[ "Performs", "a", "complete", "refund", "on", "an", "invoice", "part", "payment", "and", "mobile", "purchase", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2831-L2849
24,725
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.creditPart
public function creditPart($invNo, $credNo = "") { $this->_checkInvNo($invNo); $this->_checkCredNo($credNo); if ($this->goodsList === null || empty($this->goodsList)) { $this->_checkArtNos($this->artNos); } //function activate_part_digest $string = $this...
php
public function creditPart($invNo, $credNo = "") { $this->_checkInvNo($invNo); $this->_checkCredNo($credNo); if ($this->goodsList === null || empty($this->goodsList)) { $this->_checkArtNos($this->artNos); } //function activate_part_digest $string = $this...
[ "public", "function", "creditPart", "(", "$", "invNo", ",", "$", "credNo", "=", "\"\"", ")", "{", "$", "this", "->", "_checkInvNo", "(", "$", "invNo", ")", ";", "$", "this", "->", "_checkCredNo", "(", "$", "credNo", ")", ";", "if", "(", "$", "this"...
Performs a partial refund on an invoice, part payment or mobile purchase. <b>Note</b>:<br> You need to call {@link Klarna::addArtNo()} first.<br> @param string $invNo Invoice number. @param string $credNo Credit number. @see Klarna::addArtNo() @throws KlarnaException @return string Invoice number.
[ "Performs", "a", "partial", "refund", "on", "an", "invoice", "part", "payment", "or", "mobile", "purchase", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2865-L2904
24,726
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.updateGoodsQty
public function updateGoodsQty($invNo, $artNo, $qty) { $this->_checkInvNo($invNo); $this->_checkQty($qty); $this->_checkArtNo($artNo); $digestSecret = self::digest( $this->colon($invNo, $artNo, $qty, $this->_secret) ); $paramList = array( $th...
php
public function updateGoodsQty($invNo, $artNo, $qty) { $this->_checkInvNo($invNo); $this->_checkQty($qty); $this->_checkArtNo($artNo); $digestSecret = self::digest( $this->colon($invNo, $artNo, $qty, $this->_secret) ); $paramList = array( $th...
[ "public", "function", "updateGoodsQty", "(", "$", "invNo", ",", "$", "artNo", ",", "$", "qty", ")", "{", "$", "this", "->", "_checkInvNo", "(", "$", "invNo", ")", ";", "$", "this", "->", "_checkQty", "(", "$", "qty", ")", ";", "$", "this", "->", ...
Changes the quantity of a specific item in a passive invoice. @param string $invNo Invoice number. @param string $artNo Article number. @param int $qty Quantity of specified article. @throws KlarnaException @return string Invoice number.
[ "Changes", "the", "quantity", "of", "a", "specific", "item", "in", "a", "passive", "invoice", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2917-L2938
24,727
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.invoiceAddress
public function invoiceAddress($invNo) { $this->_checkInvNo($invNo); $digestSecret = self::digest( $this->colon($this->_eid, $invNo, $this->_secret) ); $paramList = array( $this->_eid, $invNo, $digestSecret ); self::pr...
php
public function invoiceAddress($invNo) { $this->_checkInvNo($invNo); $digestSecret = self::digest( $this->colon($this->_eid, $invNo, $this->_secret) ); $paramList = array( $this->_eid, $invNo, $digestSecret ); self::pr...
[ "public", "function", "invoiceAddress", "(", "$", "invNo", ")", "{", "$", "this", "->", "_checkInvNo", "(", "$", "invNo", ")", ";", "$", "digestSecret", "=", "self", "::", "digest", "(", "$", "this", "->", "colon", "(", "$", "this", "->", "_eid", ","...
The invoice_address function is used to retrieve the address of a purchase. @param string $invNo Invoice number. @throws KlarnaException @return KlarnaAddr
[ "The", "invoice_address", "function", "is", "used", "to", "retrieve", "the", "address", "of", "a", "purchase", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2993-L3025
24,728
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.invoicePartAmount
public function invoicePartAmount($invNo) { $this->_checkInvNo($invNo); $this->_checkArtNos($this->artNos); //function activate_part_digest $string = $this->_eid . ":" . $invNo . ":"; foreach ($this->artNos as $artNo) { $string .= $artNo["artno"] . ":". $artNo["q...
php
public function invoicePartAmount($invNo) { $this->_checkInvNo($invNo); $this->_checkArtNos($this->artNos); //function activate_part_digest $string = $this->_eid . ":" . $invNo . ":"; foreach ($this->artNos as $artNo) { $string .= $artNo["artno"] . ":". $artNo["q...
[ "public", "function", "invoicePartAmount", "(", "$", "invNo", ")", "{", "$", "this", "->", "_checkInvNo", "(", "$", "invNo", ")", ";", "$", "this", "->", "_checkArtNos", "(", "$", "this", "->", "artNos", ")", ";", "//function activate_part_digest", "$", "s...
Retrieves the amount of a specific goods from a purchase. <b>Note</b>:<br> You need to call {@link Klarna::addArtNo()} first.<br> @param string $invNo Invoice number. @see Klarna::addArtNo() @throws KlarnaException @return float The amount of the goods.
[ "Retrieves", "the", "amount", "of", "a", "specific", "goods", "from", "a", "purchase", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3040-L3066
24,729
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.getCustomerNo
public function getCustomerNo($pno, $encoding = null) { //Get the PNO/SSN encoding constant. if ($encoding === null) { $encoding = $this->getPNOEncoding(); } $this->_checkPNO($pno, $encoding); $digestSecret = self::digest( $this->colon($this->_eid, $p...
php
public function getCustomerNo($pno, $encoding = null) { //Get the PNO/SSN encoding constant. if ($encoding === null) { $encoding = $this->getPNOEncoding(); } $this->_checkPNO($pno, $encoding); $digestSecret = self::digest( $this->colon($this->_eid, $p...
[ "public", "function", "getCustomerNo", "(", "$", "pno", ",", "$", "encoding", "=", "null", ")", "{", "//Get the PNO/SSN encoding constant.", "if", "(", "$", "encoding", "===", "null", ")", "{", "$", "encoding", "=", "$", "this", "->", "getPNOEncoding", "(", ...
Retrieves a list of all the customer numbers associated with the specified pno. @param string $pno Social security number, Personal number, ... @param int $encoding {@link KlarnaEncoding PNO Encoding} constant. @throws KlarnaException @return array An array containing all customer numbers associated with that...
[ "Retrieves", "a", "list", "of", "all", "the", "customer", "numbers", "associated", "with", "the", "specified", "pno", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3123-L3144
24,730
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.setCustomerNo
public function setCustomerNo($pno, $custNo, $encoding = null) { //Get the PNO/SSN encoding constant. if ($encoding === null) { $encoding = $this->getPNOEncoding(); } $this->_checkPNO($pno, $encoding); $this->_checkArgument($custNo, 'custNo'); $digestSec...
php
public function setCustomerNo($pno, $custNo, $encoding = null) { //Get the PNO/SSN encoding constant. if ($encoding === null) { $encoding = $this->getPNOEncoding(); } $this->_checkPNO($pno, $encoding); $this->_checkArgument($custNo, 'custNo'); $digestSec...
[ "public", "function", "setCustomerNo", "(", "$", "pno", ",", "$", "custNo", ",", "$", "encoding", "=", "null", ")", "{", "//Get the PNO/SSN encoding constant.", "if", "(", "$", "encoding", "===", "null", ")", "{", "$", "encoding", "=", "$", "this", "->", ...
Associates a pno with a customer number when you want to make future purchases without a pno. @param string $pno Social security number, Personal number, ... @param string $custNo The customer number. @param int $encoding {@link KlarnaEncoding PNO Encoding} constant. @throws KlarnaException @return bool Tr...
[ "Associates", "a", "pno", "with", "a", "customer", "number", "when", "you", "want", "to", "make", "future", "purchases", "without", "a", "pno", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3157-L3183
24,731
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.removeCustomerNo
public function removeCustomerNo($custNo) { $this->_checkArgument($custNo, 'custNo'); $digestSecret = self::digest( $this->colon($this->_eid, $custNo, $this->_secret) ); $paramList = array( $custNo, $this->_eid, $digestSecret ...
php
public function removeCustomerNo($custNo) { $this->_checkArgument($custNo, 'custNo'); $digestSecret = self::digest( $this->colon($this->_eid, $custNo, $this->_secret) ); $paramList = array( $custNo, $this->_eid, $digestSecret ...
[ "public", "function", "removeCustomerNo", "(", "$", "custNo", ")", "{", "$", "this", "->", "_checkArgument", "(", "$", "custNo", ",", "'custNo'", ")", ";", "$", "digestSecret", "=", "self", "::", "digest", "(", "$", "this", "->", "colon", "(", "$", "th...
Removes a customer number from association with a pno. @param string $custNo The customer number. @throws KlarnaException @return bool True, if the customer number association was removed.
[ "Removes", "a", "customer", "number", "from", "association", "with", "a", "pno", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3193-L3212
24,732
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.getPCStorage
public function getPCStorage() { if (isset($this->pclasses)) { return $this->pclasses; } include_once 'pclasses/storage.intf.php'; $className = $this->pcStorage.'storage'; $pclassStorage = dirname(__FILE__) . "/pclasses/{$className}.class.php"; include_o...
php
public function getPCStorage() { if (isset($this->pclasses)) { return $this->pclasses; } include_once 'pclasses/storage.intf.php'; $className = $this->pcStorage.'storage'; $pclassStorage = dirname(__FILE__) . "/pclasses/{$className}.class.php"; include_o...
[ "public", "function", "getPCStorage", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "pclasses", ")", ")", "{", "return", "$", "this", "->", "pclasses", ";", "}", "include_once", "'pclasses/storage.intf.php'", ";", "$", "className", "=", "$", ...
Returns the configured PCStorage object. @throws Exception|KlarnaException @return PCStorage
[ "Returns", "the", "configured", "PCStorage", "object", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3220-L3239
24,733
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.clearPClasses
public function clearPClasses() { $this->_checkConfig(); $pclasses = $this->getPCStorage(); $pclasses->clear($this->pcURI); }
php
public function clearPClasses() { $this->_checkConfig(); $pclasses = $this->getPCStorage(); $pclasses->clear($this->pcURI); }
[ "public", "function", "clearPClasses", "(", ")", "{", "$", "this", "->", "_checkConfig", "(", ")", ";", "$", "pclasses", "=", "$", "this", "->", "getPCStorage", "(", ")", ";", "$", "pclasses", "->", "clear", "(", "$", "this", "->", "pcURI", ")", ";",...
Removes the stored PClasses, if you need to update them. @throws KlarnaException @return void
[ "Removes", "the", "stored", "PClasses", "if", "you", "need", "to", "update", "them", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3345-L3351
24,734
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.getPClasses
public function getPClasses($type = null) { $this->_checkConfig(); if (!$this->pclasses) { $this->pclasses = $this->getPCStorage(); $this->pclasses->load($this->pcURI); } $tmp = $this->pclasses->getPClasses( $this->_eid, $this->_country, $type ...
php
public function getPClasses($type = null) { $this->_checkConfig(); if (!$this->pclasses) { $this->pclasses = $this->getPCStorage(); $this->pclasses->load($this->pcURI); } $tmp = $this->pclasses->getPClasses( $this->_eid, $this->_country, $type ...
[ "public", "function", "getPClasses", "(", "$", "type", "=", "null", ")", "{", "$", "this", "->", "_checkConfig", "(", ")", ";", "if", "(", "!", "$", "this", "->", "pclasses", ")", "{", "$", "this", "->", "pclasses", "=", "$", "this", "->", "getPCSt...
Retrieves the specified PClasses. <b>Type can be</b>:<br> {@link KlarnaPClass::CAMPAIGN}<br> {@link KlarnaPClass::ACCOUNT}<br> {@link KlarnaPClass::SPECIAL}<br> {@link KlarnaPClass::FIXED}<br> {@link KlarnaPClass::DELAY}<br> {@link KlarnaPClass::MOBILE}<br> @param int $type PClass type identifier. @throws KlarnaExce...
[ "Retrieves", "the", "specified", "PClasses", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3369-L3382
24,735
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.getAllPClasses
public function getAllPClasses() { if (!$this->pclasses) { $this->pclasses = $this->getPCStorage(); $this->pclasses->load($this->pcURI); } return $this->pclasses->getAllPClasses(); }
php
public function getAllPClasses() { if (!$this->pclasses) { $this->pclasses = $this->getPCStorage(); $this->pclasses->load($this->pcURI); } return $this->pclasses->getAllPClasses(); }
[ "public", "function", "getAllPClasses", "(", ")", "{", "if", "(", "!", "$", "this", "->", "pclasses", ")", "{", "$", "this", "->", "pclasses", "=", "$", "this", "->", "getPCStorage", "(", ")", ";", "$", "this", "->", "pclasses", "->", "load", "(", ...
Retrieve a flattened array of all pclasses stored in the configured pclass storage. @return array
[ "Retrieve", "a", "flattened", "array", "of", "all", "pclasses", "stored", "in", "the", "configured", "pclass", "storage", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3390-L3397
24,736
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.getPClass
public function getPClass($id) { if (!is_numeric($id)) { throw new Klarna_InvalidTypeException('id', 'integer'); } $this->_checkConfig(); if (!$this->pclasses || !($this->pclasses instanceof PCStorage)) { $this->pclasses = $this->getPCStorage(); ...
php
public function getPClass($id) { if (!is_numeric($id)) { throw new Klarna_InvalidTypeException('id', 'integer'); } $this->_checkConfig(); if (!$this->pclasses || !($this->pclasses instanceof PCStorage)) { $this->pclasses = $this->getPCStorage(); ...
[ "public", "function", "getPClass", "(", "$", "id", ")", "{", "if", "(", "!", "is_numeric", "(", "$", "id", ")", ")", "{", "throw", "new", "Klarna_InvalidTypeException", "(", "'id'", ",", "'integer'", ")", ";", "}", "$", "this", "->", "_checkConfig", "(...
Returns the specified PClass. @param int $id The PClass ID. @return KlarnaPClass
[ "Returns", "the", "specified", "PClass", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3406-L3421
24,737
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.sortPClasses
public function sortPClasses(&$array) { if (!is_array($array)) { //Input is not an array! $array = array(); return; } //Sort pclasses array after natural sort (natcmp) if (!function_exists('pcCmp')) { /** * Comparison funct...
php
public function sortPClasses(&$array) { if (!is_array($array)) { //Input is not an array! $array = array(); return; } //Sort pclasses array after natural sort (natcmp) if (!function_exists('pcCmp')) { /** * Comparison funct...
[ "public", "function", "sortPClasses", "(", "&", "$", "array", ")", "{", "if", "(", "!", "is_array", "(", "$", "array", ")", ")", "{", "//Input is not an array!", "$", "array", "=", "array", "(", ")", ";", "return", ";", "}", "//Sort pclasses array after na...
Sorts the specified array of KlarnaPClasses. @param array &$array An array of {@link KlarnaPClass PClasses}. @return void
[ "Sorts", "the", "specified", "array", "of", "KlarnaPClasses", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3430-L3467
24,738
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.getCheapestPClass
public function getCheapestPClass($sum, $flags) { if (!is_numeric($sum)) { throw new Klarna_InvalidPriceException($sum); } if (!is_numeric($flags) || !in_array( $flags, array( KlarnaFlags::CHECKOUT_PAGE, KlarnaFlags::PRODUCT_PAGE) ...
php
public function getCheapestPClass($sum, $flags) { if (!is_numeric($sum)) { throw new Klarna_InvalidPriceException($sum); } if (!is_numeric($flags) || !in_array( $flags, array( KlarnaFlags::CHECKOUT_PAGE, KlarnaFlags::PRODUCT_PAGE) ...
[ "public", "function", "getCheapestPClass", "(", "$", "sum", ",", "$", "flags", ")", "{", "if", "(", "!", "is_numeric", "(", "$", "sum", ")", ")", "{", "throw", "new", "Klarna_InvalidPriceException", "(", "$", "sum", ")", ";", "}", "if", "(", "!", "is...
Returns the cheapest, per month, PClass related to the specified sum. <b>Note</b>: This choose the cheapest PClass for the current country.<br> {@link Klarna::setCountry()} <b>Flags can be</b>:<br> {@link KlarnaFlags::CHECKOUT_PAGE}<br> {@link KlarnaFlags::PRODUCT_PAGE}<br> @param float $sum The product cost, or t...
[ "Returns", "the", "cheapest", "per", "month", "PClass", "related", "to", "the", "specified", "sum", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3485-L3526
24,739
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.initCheckout
protected function initCheckout() { $dir = dirname(__FILE__); //Require the CheckoutHTML interface/abstract class include_once $dir.'/checkout/checkouthtml.intf.php'; //Iterate over all .class.php files in checkout/ foreach (glob($dir.'/checkout/*.class.php') as $checkout) ...
php
protected function initCheckout() { $dir = dirname(__FILE__); //Require the CheckoutHTML interface/abstract class include_once $dir.'/checkout/checkouthtml.intf.php'; //Iterate over all .class.php files in checkout/ foreach (glob($dir.'/checkout/*.class.php') as $checkout) ...
[ "protected", "function", "initCheckout", "(", ")", "{", "$", "dir", "=", "dirname", "(", "__FILE__", ")", ";", "//Require the CheckoutHTML interface/abstract class", "include_once", "$", "dir", ".", "'/checkout/checkouthtml.intf.php'", ";", "//Iterate over all .class.php fi...
Initializes the checkoutHTML objects. @see Klarna::checkoutHTML() @return void
[ "Initializes", "the", "checkoutHTML", "objects", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3534-L3560
24,740
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.checkoutHTML
public function checkoutHTML() { if (empty($this->coObjects)) { $this->initCheckout(); } $dir = dirname(__FILE__); //Require the CheckoutHTML interface/abstract class include_once $dir.'/checkout/checkouthtml.intf.php'; //Iterate over all .class.php file...
php
public function checkoutHTML() { if (empty($this->coObjects)) { $this->initCheckout(); } $dir = dirname(__FILE__); //Require the CheckoutHTML interface/abstract class include_once $dir.'/checkout/checkouthtml.intf.php'; //Iterate over all .class.php file...
[ "public", "function", "checkoutHTML", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "coObjects", ")", ")", "{", "$", "this", "->", "initCheckout", "(", ")", ";", "}", "$", "dir", "=", "dirname", "(", "__FILE__", ")", ";", "//Require the ...
Returns the checkout page HTML from the checkout classes. <b>Note</b>:<br> This method uses output buffering to silence unwanted echoes.<br> @see CheckoutHTML @return string A HTML string.
[ "Returns", "the", "checkout", "page", "HTML", "from", "the", "checkout", "classes", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3572-L3597
24,741
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.xmlrpc_call
protected function xmlrpc_call($method, $array) { $this->_checkConfig(); if (!isset($method) || !is_string($method)) { throw new Klarna_InvalidTypeException('method', 'string'); } if ($array === null || count($array) === 0) { throw new KlarnaException("Parame...
php
protected function xmlrpc_call($method, $array) { $this->_checkConfig(); if (!isset($method) || !is_string($method)) { throw new Klarna_InvalidTypeException('method', 'string'); } if ($array === null || count($array) === 0) { throw new KlarnaException("Parame...
[ "protected", "function", "xmlrpc_call", "(", "$", "method", ",", "$", "array", ")", "{", "$", "this", "->", "_checkConfig", "(", ")", ";", "if", "(", "!", "isset", "(", "$", "method", ")", "||", "!", "is_string", "(", "$", "method", ")", ")", "{", ...
Creates a XMLRPC call with specified XMLRPC method and parameters from array. @param string $method XMLRPC method. @param array $array XMLRPC parameters. @throws KlarnaException @return mixed
[ "Creates", "a", "XMLRPC", "call", "with", "specified", "XMLRPC", "method", "and", "parameters", "from", "array", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3608-L3692
24,742
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.checkoutService
public function checkoutService($price, $currency, $locale, $country = null) { $this->_checkAmount($price); $params = array( 'merchant_id' => $this->config['eid'], 'total_price' => $price, 'currency' => strtoupper($currency), 'locale' => strtolower($l...
php
public function checkoutService($price, $currency, $locale, $country = null) { $this->_checkAmount($price); $params = array( 'merchant_id' => $this->config['eid'], 'total_price' => $price, 'currency' => strtoupper($currency), 'locale' => strtolower($l...
[ "public", "function", "checkoutService", "(", "$", "price", ",", "$", "currency", ",", "$", "locale", ",", "$", "country", "=", "null", ")", "{", "$", "this", "->", "_checkAmount", "(", "$", "price", ")", ";", "$", "params", "=", "array", "(", "'merc...
Perform a checkout service request. @param int|float $price The total price for the checkout including VAT. @param string $currency ISO 4217 Currency Code @param string $locale Specify what locale is used by the checkout. ISO 639 language and ISO 3166-1 country separated by underscore. Example: sv_SE @param...
[ "Perform", "a", "checkout", "service", "request", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3723-L3741
24,743
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.digest
public static function digest($data, $hash = null) { if ($hash===null) { $preferred = array( 'sha512', 'sha384', 'sha256', 'sha224', 'md5' ); $hashes = array_intersect($preferred, hash_algos(...
php
public static function digest($data, $hash = null) { if ($hash===null) { $preferred = array( 'sha512', 'sha384', 'sha256', 'sha224', 'md5' ); $hashes = array_intersect($preferred, hash_algos(...
[ "public", "static", "function", "digest", "(", "$", "data", ",", "$", "hash", "=", "null", ")", "{", "if", "(", "$", "hash", "===", "null", ")", "{", "$", "preferred", "=", "array", "(", "'sha512'", ",", "'sha384'", ",", "'sha256'", ",", "'sha224'", ...
Creates a digest hash from the inputted string, and the specified or the preferred hash algorithm. @param string $data Data to be hashed. @param string $hash hash algoritm to use @throws KlarnaException @return string Base64 encoded hash.
[ "Creates", "a", "digest", "hash", "from", "the", "inputted", "string", "and", "the", "specified", "or", "the", "preferred", "hash", "algorithm", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3824-L3847
24,744
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.num_htmlentities
public static function num_htmlentities($str) { $charset = 'ISO-8859-1'; if (!self::$htmlentities) { self::$htmlentities = array(); $table = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES, $charset); foreach ($table as $char => $entity) { se...
php
public static function num_htmlentities($str) { $charset = 'ISO-8859-1'; if (!self::$htmlentities) { self::$htmlentities = array(); $table = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES, $charset); foreach ($table as $char => $entity) { se...
[ "public", "static", "function", "num_htmlentities", "(", "$", "str", ")", "{", "$", "charset", "=", "'ISO-8859-1'", ";", "if", "(", "!", "self", "::", "$", "htmlentities", ")", "{", "self", "::", "$", "htmlentities", "=", "array", "(", ")", ";", "$", ...
Converts special characters to numeric htmlentities. <b>Note</b>:<br> If supplied string is encoded with UTF-8, o umlaut ("ö") will become two HTML entities instead of one. @param string $str String to be converted. @return string String converted to numeric HTML entities.
[ "Converts", "special", "characters", "to", "numeric", "htmlentities", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3860-L3877
24,745
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna._checkArgument
private function _checkArgument($argument, $name) { if (!is_string($argument)) { $argument = strval($argument); } if (strlen($argument) == 0) { throw new Klarna_ArgumentNotSetException($name); } }
php
private function _checkArgument($argument, $name) { if (!is_string($argument)) { $argument = strval($argument); } if (strlen($argument) == 0) { throw new Klarna_ArgumentNotSetException($name); } }
[ "private", "function", "_checkArgument", "(", "$", "argument", ",", "$", "name", ")", "{", "if", "(", "!", "is_string", "(", "$", "argument", ")", ")", "{", "$", "argument", "=", "strval", "(", "$", "argument", ")", ";", "}", "if", "(", "strlen", "...
Check so required argument is supplied. @param string $argument argument to check @param string $name name of argument @throws Klarna_ArgumentNotSetException @return void
[ "Check", "so", "required", "argument", "is", "supplied", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L4356-L4365
24,746
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna.setPCStorage
public function setPCStorage($pcStorage) { if (!($pcStorage instanceof PCStorage)) { throw new Klarna_InvalidTypeException('pcStorage', 'PCStorage'); } $this->pcStorage = $pcStorage->getName(); $this->pclasses = $pcStorage; }
php
public function setPCStorage($pcStorage) { if (!($pcStorage instanceof PCStorage)) { throw new Klarna_InvalidTypeException('pcStorage', 'PCStorage'); } $this->pcStorage = $pcStorage->getName(); $this->pclasses = $pcStorage; }
[ "public", "function", "setPCStorage", "(", "$", "pcStorage", ")", "{", "if", "(", "!", "(", "$", "pcStorage", "instanceof", "PCStorage", ")", ")", "{", "throw", "new", "Klarna_InvalidTypeException", "(", "'pcStorage'", ",", "'PCStorage'", ")", ";", "}", "$",...
Set the pcStorage method used for this instance @param PCStorage $pcStorage PCStorage implementation @return void
[ "Set", "the", "pcStorage", "method", "used", "for", "this", "instance" ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L4403-L4410
24,747
Subscribo/klarna-invoice-sdk-wrapped
src/Klarna.php
Klarna._checkConfig
private function _checkConfig($config = null) { if ($config === null) { $config = $this->config; } if (!($config instanceof ArrayAccess) && !is_array($config) ) { throw new Klarna_IncompleteConfigurationException; } }
php
private function _checkConfig($config = null) { if ($config === null) { $config = $this->config; } if (!($config instanceof ArrayAccess) && !is_array($config) ) { throw new Klarna_IncompleteConfigurationException; } }
[ "private", "function", "_checkConfig", "(", "$", "config", "=", "null", ")", "{", "if", "(", "$", "config", "===", "null", ")", "{", "$", "config", "=", "$", "this", "->", "config", ";", "}", "if", "(", "!", "(", "$", "config", "instanceof", "Array...
Ensure the configuration is of the correct type. @param array|ArrayAccess|null $config an optional config to validate @return void
[ "Ensure", "the", "configuration", "is", "of", "the", "correct", "type", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L4419-L4429
24,748
Talesoft/tale-framework
src/Tale/Event.php
Event.removeHandler
public function removeHandler($handler) { if(!is_callable($handler)) throw new \InvalidArgumentException("Argument 1 of Event->addHandler needs to be a valid callback"); $i = array_search($handler, $this->_handlers, true); if ($i !== false) unset($this->_handlers[$i...
php
public function removeHandler($handler) { if(!is_callable($handler)) throw new \InvalidArgumentException("Argument 1 of Event->addHandler needs to be a valid callback"); $i = array_search($handler, $this->_handlers, true); if ($i !== false) unset($this->_handlers[$i...
[ "public", "function", "removeHandler", "(", "$", "handler", ")", "{", "if", "(", "!", "is_callable", "(", "$", "handler", ")", ")", "throw", "new", "\\", "InvalidArgumentException", "(", "\"Argument 1 of Event->addHandler needs to be a valid callback\"", ")", ";", "...
Removes an assigned handler This uses array_search to find the handler @param callable $handler The handler to remove @return $this
[ "Removes", "an", "assigned", "handler" ]
739a7011c6dad409a51c4bcfbcf4b4ffbc8cba49
https://github.com/Talesoft/tale-framework/blob/739a7011c6dad409a51c4bcfbcf4b4ffbc8cba49/src/Tale/Event.php#L89-L100
24,749
Talesoft/tale-framework
src/Tale/Event.php
Event.trigger
public function trigger(Event\Args $args = null, $reverse = false) { $args = $args ? $args : new Event\Args(); if ($reverse) { for ($i = count($this->_handlers); --$i >= 0;) { if (call_user_func_array($this->_handlers[$i], func_get_args()) === false) ...
php
public function trigger(Event\Args $args = null, $reverse = false) { $args = $args ? $args : new Event\Args(); if ($reverse) { for ($i = count($this->_handlers); --$i >= 0;) { if (call_user_func_array($this->_handlers[$i], func_get_args()) === false) ...
[ "public", "function", "trigger", "(", "Event", "\\", "Args", "$", "args", "=", "null", ",", "$", "reverse", "=", "false", ")", "{", "$", "args", "=", "$", "args", "?", "$", "args", ":", "new", "Event", "\\", "Args", "(", ")", ";", "if", "(", "$...
Triggers the event The return value is the the negation of isDefaultPrevented() result of the event args If null is passed, new event args are created automatically @param \Tale\Event\Args|null $args An argument object to pass @param bool $reverse @return bool
[ "Triggers", "the", "event" ]
739a7011c6dad409a51c4bcfbcf4b4ffbc8cba49
https://github.com/Talesoft/tale-framework/blob/739a7011c6dad409a51c4bcfbcf4b4ffbc8cba49/src/Tale/Event.php#L114-L136
24,750
bandama-framework/bandama-framework
src/foundation/controller/Controller.php
Controller.render
public function render($view, $params = array()) { $viewPath = $this->viewPath; $viewPath = rtrim($viewPath, '/').'/'; extract($params); if (is_file($view)) { require_once($view); } else if (is_file($viewPath.str_replace(':', '/', $view))) { require_once($...
php
public function render($view, $params = array()) { $viewPath = $this->viewPath; $viewPath = rtrim($viewPath, '/').'/'; extract($params); if (is_file($view)) { require_once($view); } else if (is_file($viewPath.str_replace(':', '/', $view))) { require_once($...
[ "public", "function", "render", "(", "$", "view", ",", "$", "params", "=", "array", "(", ")", ")", "{", "$", "viewPath", "=", "$", "this", "->", "viewPath", ";", "$", "viewPath", "=", "rtrim", "(", "$", "viewPath", ",", "'/'", ")", ".", "'/'", ";...
Render the content of view file or text @param string View path of view file or text @param array View parameters @return string
[ "Render", "the", "content", "of", "view", "file", "or", "text" ]
234ed703baf9e31268941c9d5f6d5e004cc53066
https://github.com/bandama-framework/bandama-framework/blob/234ed703baf9e31268941c9d5f6d5e004cc53066/src/foundation/controller/Controller.php#L39-L50
24,751
PenoaksDev/Milky-Framework
src/Milky/Config/ConfigurationLoader.php
ConfigurationLoader.create
public static function create( ConfigurationBuilder $builder ) { // TODO Currently only supports PHP files, need to add optional json and yaml support. $configPath = Framework::fw()->buildPath( '__config' ); $configFile = $configPath . __ . $builder->key() . ".php"; if ( file_put_contents( $configFile, $bui...
php
public static function create( ConfigurationBuilder $builder ) { // TODO Currently only supports PHP files, need to add optional json and yaml support. $configPath = Framework::fw()->buildPath( '__config' ); $configFile = $configPath . __ . $builder->key() . ".php"; if ( file_put_contents( $configFile, $bui...
[ "public", "static", "function", "create", "(", "ConfigurationBuilder", "$", "builder", ")", "{", "// TODO Currently only supports PHP files, need to add optional json and yaml support.", "$", "configPath", "=", "Framework", "::", "fw", "(", ")", "->", "buildPath", "(", "'...
Saves a builder to the filesystem @param ConfigurationBuilder $builder @throws FrameworkException
[ "Saves", "a", "builder", "to", "the", "filesystem" ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Config/ConfigurationLoader.php#L108-L123
24,752
theomessin/ts-framework
src/Adapter/ServerQuery/Reply.php
Reply.fetchError
protected function fetchError($err) { $cells = $err->section(Teamspeak::SEPARATOR_CELL, 1, 3); foreach ($cells->split(Teamspeak::SEPARATOR_CELL) as $pair) { list($ident, $value) = $pair->split(Teamspeak::SEPARATOR_PAIR); $this->err[$ident->toString()] = $value->isInt() ? $v...
php
protected function fetchError($err) { $cells = $err->section(Teamspeak::SEPARATOR_CELL, 1, 3); foreach ($cells->split(Teamspeak::SEPARATOR_CELL) as $pair) { list($ident, $value) = $pair->split(Teamspeak::SEPARATOR_PAIR); $this->err[$ident->toString()] = $value->isInt() ? $v...
[ "protected", "function", "fetchError", "(", "$", "err", ")", "{", "$", "cells", "=", "$", "err", "->", "section", "(", "Teamspeak", "::", "SEPARATOR_CELL", ",", "1", ",", "3", ")", ";", "foreach", "(", "$", "cells", "->", "split", "(", "Teamspeak", "...
Parses a ServerQuery error and throws a Ts3Exception object if there's an error. @param StringHelper|string $err @throws Ts3Exception @return void
[ "Parses", "a", "ServerQuery", "error", "and", "throws", "a", "Ts3Exception", "object", "if", "there", "s", "an", "error", "." ]
d60e36553241db05cb05ef19e749866cc977437c
https://github.com/theomessin/ts-framework/blob/d60e36553241db05cb05ef19e749866cc977437c/src/Adapter/ServerQuery/Reply.php#L287-L319
24,753
theomessin/ts-framework
src/Adapter/ServerQuery/Reply.php
Reply.fetchReply
protected function fetchReply($rpl) { foreach ($rpl as $key => $val) { if ($val->startsWith(Teamspeak::GREET)) { unset($rpl[$key]); } elseif ($val->startsWith(Teamspeak::EVENT)) { $this->evt[] = new Event($rpl[$key], $this->con); unset(...
php
protected function fetchReply($rpl) { foreach ($rpl as $key => $val) { if ($val->startsWith(Teamspeak::GREET)) { unset($rpl[$key]); } elseif ($val->startsWith(Teamspeak::EVENT)) { $this->evt[] = new Event($rpl[$key], $this->con); unset(...
[ "protected", "function", "fetchReply", "(", "$", "rpl", ")", "{", "foreach", "(", "$", "rpl", "as", "$", "key", "=>", "$", "val", ")", "{", "if", "(", "$", "val", "->", "startsWith", "(", "Teamspeak", "::", "GREET", ")", ")", "{", "unset", "(", "...
Parses a ServerQuery reply and creates a String object. @param array $rpl @return void
[ "Parses", "a", "ServerQuery", "reply", "and", "creates", "a", "String", "object", "." ]
d60e36553241db05cb05ef19e749866cc977437c
https://github.com/theomessin/ts-framework/blob/d60e36553241db05cb05ef19e749866cc977437c/src/Adapter/ServerQuery/Reply.php#L327-L339
24,754
MasterkeyInformatica/browser-kit
Response.php
Response.getHeader
public function getHeader($header, $first = true) { $normalizedHeader = str_replace('-', '_', strtolower($header)); foreach ($this->headers as $key => $value) { if (str_replace('-', '_', strtolower($key)) === $normalizedHeader) { if ($first) { return i...
php
public function getHeader($header, $first = true) { $normalizedHeader = str_replace('-', '_', strtolower($header)); foreach ($this->headers as $key => $value) { if (str_replace('-', '_', strtolower($key)) === $normalizedHeader) { if ($first) { return i...
[ "public", "function", "getHeader", "(", "$", "header", ",", "$", "first", "=", "true", ")", "{", "$", "normalizedHeader", "=", "str_replace", "(", "'-'", ",", "'_'", ",", "strtolower", "(", "$", "header", ")", ")", ";", "foreach", "(", "$", "this", "...
Gets a response header. @param string $header The header name @param bool $first Whether to return the first value or all header values @return string|array The first header value if $first is true, an array of values otherwise
[ "Gets", "a", "response", "header", "." ]
fd735ad31c00af54d5c060d01218aa48308557f7
https://github.com/MasterkeyInformatica/browser-kit/blob/fd735ad31c00af54d5c060d01218aa48308557f7/Response.php#L114-L128
24,755
eliasis-framework/complement
src/Traits/ComplementAction.php
ComplementAction.getAction
public function getAction($state) { $type = self::getType('strtolower', false); $action = self::$defaultAction[$type]; if (isset($this->states['action'])) { $action = $this->states['action']; } return ($state === 'uninstalled') ? '' : $action; }
php
public function getAction($state) { $type = self::getType('strtolower', false); $action = self::$defaultAction[$type]; if (isset($this->states['action'])) { $action = $this->states['action']; } return ($state === 'uninstalled') ? '' : $action; }
[ "public", "function", "getAction", "(", "$", "state", ")", "{", "$", "type", "=", "self", "::", "getType", "(", "'strtolower'", ",", "false", ")", ";", "$", "action", "=", "self", "::", "$", "defaultAction", "[", "$", "type", "]", ";", "if", "(", "...
Get complement action. @param string $state → complement state @uses \Eliasis\Complement\ComplementState->$states @uses \Eliasis\Complement\Traits\ComplementHandler::getType() @return string → complement action
[ "Get", "complement", "action", "." ]
d50e92cf01600ff4573bf1761c312069044748c3
https://github.com/eliasis-framework/complement/blob/d50e92cf01600ff4573bf1761c312069044748c3/src/Traits/ComplementAction.php#L55-L65
24,756
eliasis-framework/complement
src/Traits/ComplementAction.php
ComplementAction.doAction
public function doAction($action) { $controller = $this->getOption('hooks-controller'); $instance = $this->getControllerInstance($controller); if (is_object($instance) && method_exists($instance, $action)) { $response = call_user_func([$instance, $action]); } $t...
php
public function doAction($action) { $controller = $this->getOption('hooks-controller'); $instance = $this->getControllerInstance($controller); if (is_object($instance) && method_exists($instance, $action)) { $response = call_user_func([$instance, $action]); } $t...
[ "public", "function", "doAction", "(", "$", "action", ")", "{", "$", "controller", "=", "$", "this", "->", "getOption", "(", "'hooks-controller'", ")", ";", "$", "instance", "=", "$", "this", "->", "getControllerInstance", "(", "$", "controller", ")", ";",...
Execute action hook. @param string $action → action hook to execute @uses \Eliasis\Complement\Traits\ComplementAction::setAction() @uses \Eliasis\Complement\Traits\ComplementHandler::getOption() @return bool
[ "Execute", "action", "hook", "." ]
d50e92cf01600ff4573bf1761c312069044748c3
https://github.com/eliasis-framework/complement/blob/d50e92cf01600ff4573bf1761c312069044748c3/src/Traits/ComplementAction.php#L96-L108
24,757
eliasis-framework/complement
src/Traits/ComplementAction.php
ComplementAction.addActions
private function addActions() { if (isset($this->complement['hooks'])) { Hook::getInstance(App::getCurrentID()); return Hook::addActions($this->complement['hooks']); } return false; }
php
private function addActions() { if (isset($this->complement['hooks'])) { Hook::getInstance(App::getCurrentID()); return Hook::addActions($this->complement['hooks']); } return false; }
[ "private", "function", "addActions", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "complement", "[", "'hooks'", "]", ")", ")", "{", "Hook", "::", "getInstance", "(", "App", "::", "getCurrentID", "(", ")", ")", ";", "return", "Hook", "::...
Add complement action hooks. @uses \Eliasis\Framework\App::getCurrentID() @uses \Eliasis\Complement\Complement->$complement @uses \Josantonius\Hook\Hook::getInstance @uses \Josantonius\Hook\Hook::addActions
[ "Add", "complement", "action", "hooks", "." ]
d50e92cf01600ff4573bf1761c312069044748c3
https://github.com/eliasis-framework/complement/blob/d50e92cf01600ff4573bf1761c312069044748c3/src/Traits/ComplementAction.php#L118-L127
24,758
eliasis-framework/complement
src/Traits/ComplementAction.php
ComplementAction.doActions
private function doActions($action) { $type = self::getType('strtolower', false); Hook::getInstance(App::getCurrentID()); Hook::doAction($type . '-load'); Hook::doAction('after-loading-' . $this->complement['slug'] . '-' . $type); if (in_array($action, self::$hooks, true)) ...
php
private function doActions($action) { $type = self::getType('strtolower', false); Hook::getInstance(App::getCurrentID()); Hook::doAction($type . '-load'); Hook::doAction('after-loading-' . $this->complement['slug'] . '-' . $type); if (in_array($action, self::$hooks, true)) ...
[ "private", "function", "doActions", "(", "$", "action", ")", "{", "$", "type", "=", "self", "::", "getType", "(", "'strtolower'", ",", "false", ")", ";", "Hook", "::", "getInstance", "(", "App", "::", "getCurrentID", "(", ")", ")", ";", "Hook", "::", ...
Execute action hooks. @param string $action → action hook to execute @uses \Eliasis\Framework\App::getCurrentID() @uses \Josantonius\Hook\Hook::getInstance @uses \Josantonius\Hook\Hook::doAction @uses \Eliasis\Complement\Traits\ComplementHandler::getType()
[ "Execute", "action", "hooks", "." ]
d50e92cf01600ff4573bf1761c312069044748c3
https://github.com/eliasis-framework/complement/blob/d50e92cf01600ff4573bf1761c312069044748c3/src/Traits/ComplementAction.php#L139-L150
24,759
MichaelJ2324/PHP-REST-Client
src/Auth/Abstracts/AbstractBasicController.php
AbstractBasicController.getAuthHeaderValue
protected function getAuthHeaderValue() { $value = ""; if (isset($this->credentials['username']) && isset($this->credentials['password'])){ $value = $this->credentials['username'].":".$this->credentials['password']; $value = base64_encode($value); } return sta...
php
protected function getAuthHeaderValue() { $value = ""; if (isset($this->credentials['username']) && isset($this->credentials['password'])){ $value = $this->credentials['username'].":".$this->credentials['password']; $value = base64_encode($value); } return sta...
[ "protected", "function", "getAuthHeaderValue", "(", ")", "{", "$", "value", "=", "\"\"", ";", "if", "(", "isset", "(", "$", "this", "->", "credentials", "[", "'username'", "]", ")", "&&", "isset", "(", "$", "this", "->", "credentials", "[", "'password'",...
Parse the Credentials or Token to build out the Auth Header Value @return string
[ "Parse", "the", "Credentials", "or", "Token", "to", "build", "out", "the", "Auth", "Header", "Value" ]
b8a2caaf6456eccaa845ba5c5098608aa9645c92
https://github.com/MichaelJ2324/PHP-REST-Client/blob/b8a2caaf6456eccaa845ba5c5098608aa9645c92/src/Auth/Abstracts/AbstractBasicController.php#L34-L42
24,760
randomhost/image
src/php/Text/Decorator/Generic.php
Generic.providesMethod
public function providesMethod($name) { if (method_exists($this, $name)) { return true; } if ($this->text instanceof Generic) { return $this->text->providesMethod($name); } return false; }
php
public function providesMethod($name) { if (method_exists($this, $name)) { return true; } if ($this->text instanceof Generic) { return $this->text->providesMethod($name); } return false; }
[ "public", "function", "providesMethod", "(", "$", "name", ")", "{", "if", "(", "method_exists", "(", "$", "this", ",", "$", "name", ")", ")", "{", "return", "true", ";", "}", "if", "(", "$", "this", "->", "text", "instanceof", "Generic", ")", "{", ...
Returns if the given method is implemented by one of the decorators. @param string $name Method name. @return bool
[ "Returns", "if", "the", "given", "method", "is", "implemented", "by", "one", "of", "the", "decorators", "." ]
bd669ba6b50fd2bbbe50c4ef06235b111a8a30b0
https://github.com/randomhost/image/blob/bd669ba6b50fd2bbbe50c4ef06235b111a8a30b0/src/php/Text/Decorator/Generic.php#L149-L158
24,761
netbull/CoreBundle
Twig/CoreExtension.php
CoreExtension.buildQueryInputs
public function buildQueryInputs($currentField) { $request = $this->requestStack->getCurrentRequest(); $fields = ''; foreach ($request->query->all() as $field => $value) { // Exclude the current field and the PAGE parameter if($field !== $currentField && $field !== 'p...
php
public function buildQueryInputs($currentField) { $request = $this->requestStack->getCurrentRequest(); $fields = ''; foreach ($request->query->all() as $field => $value) { // Exclude the current field and the PAGE parameter if($field !== $currentField && $field !== 'p...
[ "public", "function", "buildQueryInputs", "(", "$", "currentField", ")", "{", "$", "request", "=", "$", "this", "->", "requestStack", "->", "getCurrentRequest", "(", ")", ";", "$", "fields", "=", "''", ";", "foreach", "(", "$", "request", "->", "query", ...
Build Hidden fields based on the URL parameters @param $currentField @return string
[ "Build", "Hidden", "fields", "based", "on", "the", "URL", "parameters" ]
0bacc1d9e4733b6da613027400c48421e5a14645
https://github.com/netbull/CoreBundle/blob/0bacc1d9e4733b6da613027400c48421e5a14645/Twig/CoreExtension.php#L130-L142
24,762
netbull/CoreBundle
Twig/CoreExtension.php
CoreExtension.inflect
public function inflect(string $string, $pluralize = 0) : string { return ($pluralize) ? Inflect::pluralize($string) : Inflect::singularize($string); }
php
public function inflect(string $string, $pluralize = 0) : string { return ($pluralize) ? Inflect::pluralize($string) : Inflect::singularize($string); }
[ "public", "function", "inflect", "(", "string", "$", "string", ",", "$", "pluralize", "=", "0", ")", ":", "string", "{", "return", "(", "$", "pluralize", ")", "?", "Inflect", "::", "pluralize", "(", "$", "string", ")", ":", "Inflect", "::", "singulariz...
Pluralize or Singularize a string @param string $string @param int $pluralize @return string
[ "Pluralize", "or", "Singularize", "a", "string" ]
0bacc1d9e4733b6da613027400c48421e5a14645
https://github.com/netbull/CoreBundle/blob/0bacc1d9e4733b6da613027400c48421e5a14645/Twig/CoreExtension.php#L205-L208
24,763
romm/configuration_object
Classes/ConfigurationObjectFactory.php
ConfigurationObjectFactory.get
public function get($className, array $objectData) { $this->runningProcesses++; try { $result = $this->convertToObject($className, $objectData); $this->runningProcesses--; return $result; } catch (\Exception $exception) { $this->runningProce...
php
public function get($className, array $objectData) { $this->runningProcesses++; try { $result = $this->convertToObject($className, $objectData); $this->runningProcesses--; return $result; } catch (\Exception $exception) { $this->runningProce...
[ "public", "function", "get", "(", "$", "className", ",", "array", "$", "objectData", ")", "{", "$", "this", "->", "runningProcesses", "++", ";", "try", "{", "$", "result", "=", "$", "this", "->", "convertToObject", "(", "$", "className", ",", "$", "obj...
Returns an instance of the given configuration object name. The object is recursively filled with the given array data. @param string $className Name of the configuration object class. The class must implement `\Romm\ConfigurationObject\ConfigurationObjectInterface`. @param array $objectData Data used to fill ...
[ "Returns", "an", "instance", "of", "the", "given", "configuration", "object", "name", ".", "The", "object", "is", "recursively", "filled", "with", "the", "given", "array", "data", "." ]
d3a40903386c2e0766bd8279337fe6da45cf5ce3
https://github.com/romm/configuration_object/blob/d3a40903386c2e0766bd8279337fe6da45cf5ce3/Classes/ConfigurationObjectFactory.php#L99-L114
24,764
romm/configuration_object
Classes/ConfigurationObjectFactory.php
ConfigurationObjectFactory.register
protected function register($className) { if (false === isset($this->configurationObjectServiceFactory[$className])) { if (false === Core::get()->classExists($className)) { throw new ClassNotFoundException( 'Trying to get a non-existing configuration object: "...
php
protected function register($className) { if (false === isset($this->configurationObjectServiceFactory[$className])) { if (false === Core::get()->classExists($className)) { throw new ClassNotFoundException( 'Trying to get a non-existing configuration object: "...
[ "protected", "function", "register", "(", "$", "className", ")", "{", "if", "(", "false", "===", "isset", "(", "$", "this", "->", "configurationObjectServiceFactory", "[", "$", "className", "]", ")", ")", "{", "if", "(", "false", "===", "Core", "::", "ge...
Any configuration object needs to be registered before it can be used. @param string $className Class name of the wanted configuration object. @return ServiceFactory @throws ClassNotFoundException @throws WrongInheritanceException @throws WrongServiceException
[ "Any", "configuration", "object", "needs", "to", "be", "registered", "before", "it", "can", "be", "used", "." ]
d3a40903386c2e0766bd8279337fe6da45cf5ce3
https://github.com/romm/configuration_object/blob/d3a40903386c2e0766bd8279337fe6da45cf5ce3/Classes/ConfigurationObjectFactory.php#L165-L199
24,765
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Schema/SchemaManager.php
SchemaManager.createAllDocumentTables
public function createAllDocumentTables() { /** * @var ClassMetadata $class */ foreach ($this->metadataFactory->getAllMetadata() as $class) { if ($class->isMappedSuperclass || $class->isEmbeddedDocument || (count($class->parentClassNames) && $class->inheritanceType == C...
php
public function createAllDocumentTables() { /** * @var ClassMetadata $class */ foreach ($this->metadataFactory->getAllMetadata() as $class) { if ($class->isMappedSuperclass || $class->isEmbeddedDocument || (count($class->parentClassNames) && $class->inheritanceType == C...
[ "public", "function", "createAllDocumentTables", "(", ")", "{", "/**\n * @var ClassMetadata $class\n */", "foreach", "(", "$", "this", "->", "metadataFactory", "->", "getAllMetadata", "(", ")", "as", "$", "class", ")", "{", "if", "(", "$", "class", ...
Create all the mapped document tables in the metadata factory. @return void
[ "Create", "all", "the", "mapped", "document", "tables", "in", "the", "metadata", "factory", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Schema/SchemaManager.php#L83-L95
24,766
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Schema/SchemaManager.php
SchemaManager.createDocumentTableFor
public function createDocumentTableFor($documentName) { $class = $this->dm->getClassMetadata($documentName); if ($class->isMappedSuperclass || $class->isEmbeddedDocument) { throw ODMException::cannotCreateMappedSuperclassTable($documentName); } $this->doCreateTable($cla...
php
public function createDocumentTableFor($documentName) { $class = $this->dm->getClassMetadata($documentName); if ($class->isMappedSuperclass || $class->isEmbeddedDocument) { throw ODMException::cannotCreateMappedSuperclassTable($documentName); } $this->doCreateTable($cla...
[ "public", "function", "createDocumentTableFor", "(", "$", "documentName", ")", "{", "$", "class", "=", "$", "this", "->", "dm", "->", "getClassMetadata", "(", "$", "documentName", ")", ";", "if", "(", "$", "class", "->", "isMappedSuperclass", "||", "$", "c...
Checks if the DynamoDB table for a mapped class exists, and if not creates it. @param string $documentName @return void @throws ODMException
[ "Checks", "if", "the", "DynamoDB", "table", "for", "a", "mapped", "class", "exists", "and", "if", "not", "creates", "it", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Schema/SchemaManager.php#L143-L152
24,767
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Schema/SchemaManager.php
SchemaManager.deleteAllDocumentTables
public function deleteAllDocumentTables() { foreach ($this->metadataFactory->getAllMetadata() as $class) { if ($class->isMappedSuperclass || $class->isEmbeddedDocument || (count($class->parentClassNames) && $class->inheritanceType == ClassMetadata::INHERITANCE_TYPE_SINGLE_TABLE)) { ...
php
public function deleteAllDocumentTables() { foreach ($this->metadataFactory->getAllMetadata() as $class) { if ($class->isMappedSuperclass || $class->isEmbeddedDocument || (count($class->parentClassNames) && $class->inheritanceType == ClassMetadata::INHERITANCE_TYPE_SINGLE_TABLE)) { ...
[ "public", "function", "deleteAllDocumentTables", "(", ")", "{", "foreach", "(", "$", "this", "->", "metadataFactory", "->", "getAllMetadata", "(", ")", "as", "$", "class", ")", "{", "if", "(", "$", "class", "->", "isMappedSuperclass", "||", "$", "class", "...
Delete all tables for document classes known to DynamoDM. @return void
[ "Delete", "all", "tables", "for", "document", "classes", "known", "to", "DynamoDM", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Schema/SchemaManager.php#L175-L184
24,768
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Schema/SchemaManager.php
SchemaManager.deleteDocumentTableFor
public function deleteDocumentTableFor($documentName) { $class = $this->dm->getClassMetadata($documentName); if ($class->isMappedSuperclass || $class->isEmbeddedDocument) { throw ODMException::cannotDeleteMappedSuperclassTable($documentName); } $this->doDeleteTable($cla...
php
public function deleteDocumentTableFor($documentName) { $class = $this->dm->getClassMetadata($documentName); if ($class->isMappedSuperclass || $class->isEmbeddedDocument) { throw ODMException::cannotDeleteMappedSuperclassTable($documentName); } $this->doDeleteTable($cla...
[ "public", "function", "deleteDocumentTableFor", "(", "$", "documentName", ")", "{", "$", "class", "=", "$", "this", "->", "dm", "->", "getClassMetadata", "(", "$", "documentName", ")", ";", "if", "(", "$", "class", "->", "isMappedSuperclass", "||", "$", "c...
Checks if the DynamoDB table for a mapped class exists, and deletes it if it does. @param string $documentName @return void @throws ODMException
[ "Checks", "if", "the", "DynamoDB", "table", "for", "a", "mapped", "class", "exists", "and", "deletes", "it", "if", "it", "does", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Schema/SchemaManager.php#L232-L241
24,769
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Schema/SchemaManager.php
SchemaManager.rebuildDocumentTableFor
public function rebuildDocumentTableFor($documentName) { $class = $this->dm->getClassMetadata($documentName); $table = $class->getTableName(); $defintiion = $class->getDefinitionTable(); $this->doDeleteTable($table, $defintiion); $this->doCreateTable($table, $defin...
php
public function rebuildDocumentTableFor($documentName) { $class = $this->dm->getClassMetadata($documentName); $table = $class->getTableName(); $defintiion = $class->getDefinitionTable(); $this->doDeleteTable($table, $defintiion); $this->doCreateTable($table, $defin...
[ "public", "function", "rebuildDocumentTableFor", "(", "$", "documentName", ")", "{", "$", "class", "=", "$", "this", "->", "dm", "->", "getClassMetadata", "(", "$", "documentName", ")", ";", "$", "table", "=", "$", "class", "->", "getTableName", "(", ")", ...
Deletes and rebuilds the DynamoDB table for a mapped class. @param string $documentName @return void
[ "Deletes", "and", "rebuilds", "the", "DynamoDB", "table", "for", "a", "mapped", "class", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Schema/SchemaManager.php#L328-L336
24,770
agentmedia/phine-core
src/Core/Modules/Backend/AreaForm.php
AreaForm.LayoutCondition
private function LayoutCondition() { $sql = Access::SqlBuilder(); $tbl = Area::Schema()->Table(); return $sql->Equals($tbl->Field('Layout'), $sql->Value($this->layout->GetID())); }
php
private function LayoutCondition() { $sql = Access::SqlBuilder(); $tbl = Area::Schema()->Table(); return $sql->Equals($tbl->Field('Layout'), $sql->Value($this->layout->GetID())); }
[ "private", "function", "LayoutCondition", "(", ")", "{", "$", "sql", "=", "Access", "::", "SqlBuilder", "(", ")", ";", "$", "tbl", "=", "Area", "::", "Schema", "(", ")", "->", "Table", "(", ")", ";", "return", "$", "sql", "->", "Equals", "(", "$", ...
Gets the layout condition for the name validator @return \Phine\Framework\Database\Sql\Condition
[ "Gets", "the", "layout", "condition", "for", "the", "name", "validator" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/AreaForm.php#L89-L94
24,771
picturae/php-composition-utils
src/WithEvents.php
WithEvents.subscribe
public function subscribe($eventType, $callback) { $callback = $this->makeEventCallback($callback); if (!isset($this->eventList[$eventType]) || !is_array($this->eventList[$eventType])) { $this->eventList[$eventType] = []; } array_push($this->eventList[$eventType], $callba...
php
public function subscribe($eventType, $callback) { $callback = $this->makeEventCallback($callback); if (!isset($this->eventList[$eventType]) || !is_array($this->eventList[$eventType])) { $this->eventList[$eventType] = []; } array_push($this->eventList[$eventType], $callba...
[ "public", "function", "subscribe", "(", "$", "eventType", ",", "$", "callback", ")", "{", "$", "callback", "=", "$", "this", "->", "makeEventCallback", "(", "$", "callback", ")", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "eventList", "[", ...
Add a callback on a specific backend event. @param string $eventType - Use constants(add your own if needed) @param callable $callback - Execution callback. @return string|null
[ "Add", "a", "callback", "on", "a", "specific", "backend", "event", "." ]
59a8191066c27687daabc8c5b33addb3599826ab
https://github.com/picturae/php-composition-utils/blob/59a8191066c27687daabc8c5b33addb3599826ab/src/WithEvents.php#L29-L37
24,772
picturae/php-composition-utils
src/WithEvents.php
WithEvents.unsubscribe
public function unsubscribe($eventType, $callbackId) { $success = false; if (!isset($this->eventList[$eventType]) || !is_array($this->eventList[$eventType])) { $this->eventList[$eventType] = array_filter( $this->eventList[$eventType], function ($cb) use ($...
php
public function unsubscribe($eventType, $callbackId) { $success = false; if (!isset($this->eventList[$eventType]) || !is_array($this->eventList[$eventType])) { $this->eventList[$eventType] = array_filter( $this->eventList[$eventType], function ($cb) use ($...
[ "public", "function", "unsubscribe", "(", "$", "eventType", ",", "$", "callbackId", ")", "{", "$", "success", "=", "false", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "eventList", "[", "$", "eventType", "]", ")", "||", "!", "is_array", "("...
Remove callback by identifier. @param string @param string
[ "Remove", "callback", "by", "identifier", "." ]
59a8191066c27687daabc8c5b33addb3599826ab
https://github.com/picturae/php-composition-utils/blob/59a8191066c27687daabc8c5b33addb3599826ab/src/WithEvents.php#L44-L57
24,773
dann95/ts3-php
TeamSpeak3/Node/Servergroup.php
Servergroup.permAssign
public function permAssign($permid, $permvalue, $permnegated = false, $permskip = false) { return $this->getParent()->serverGroupPermAssign($this->getId(), $permid, $permvalue, $permnegated, $permskip); }
php
public function permAssign($permid, $permvalue, $permnegated = false, $permskip = false) { return $this->getParent()->serverGroupPermAssign($this->getId(), $permid, $permvalue, $permnegated, $permskip); }
[ "public", "function", "permAssign", "(", "$", "permid", ",", "$", "permvalue", ",", "$", "permnegated", "=", "false", ",", "$", "permskip", "=", "false", ")", "{", "return", "$", "this", "->", "getParent", "(", ")", "->", "serverGroupPermAssign", "(", "$...
Adds a set of specified permissions to the server group. Multiple permissions can be added by providing the four parameters of each permission in separate arrays. @param integer $permid @param integer $permvalue @param bool|int $permnegated @param bool|int $permskip @return void
[ "Adds", "a", "set", "of", "specified", "permissions", "to", "the", "server", "group", ".", "Multiple", "permissions", "can", "be", "added", "by", "providing", "the", "four", "parameters", "of", "each", "permission", "in", "separate", "arrays", "." ]
d4693d78b54be0177a2b5fab316c0ff9d036238d
https://github.com/dann95/ts3-php/blob/d4693d78b54be0177a2b5fab316c0ff9d036238d/TeamSpeak3/Node/Servergroup.php#L120-L123
24,774
praxigento/mobi_mod_downline
Helper/Tree.php
Tree.getParentId
private function getParentId($item, $key) { if (is_array($item)) { $result = $item[$key]; } elseif ($item instanceof \Praxigento\Core\Data) { $result = $item->get($key); } else { $result = $item; } return $result; }
php
private function getParentId($item, $key) { if (is_array($item)) { $result = $item[$key]; } elseif ($item instanceof \Praxigento\Core\Data) { $result = $item->get($key); } else { $result = $item; } return $result; }
[ "private", "function", "getParentId", "(", "$", "item", ",", "$", "key", ")", "{", "if", "(", "is_array", "(", "$", "item", ")", ")", "{", "$", "result", "=", "$", "item", "[", "$", "key", "]", ";", "}", "elseif", "(", "$", "item", "instanceof", ...
Get Parent ID from entry. Entry can be integer, array or Data Object. @param int|array|\Praxigento\Core\Data $item @param string $key @return int
[ "Get", "Parent", "ID", "from", "entry", ".", "Entry", "can", "be", "integer", "array", "or", "Data", "Object", "." ]
0f3c276dfff1aa029f9fd205ccfc56f207a2e75b
https://github.com/praxigento/mobi_mod_downline/blob/0f3c276dfff1aa029f9fd205ccfc56f207a2e75b/Helper/Tree.php#L102-L112
24,775
Wedeto/Log
src/Writer/AbstractWriter.php
AbstractWriter.isLevelEnabled
public function isLevelEnabled(string $level, int $level_num = null) { if ($level_num === null) $level_num = Logger::getLevelNumeric($level); return $level_num >= $this->min_level; }
php
public function isLevelEnabled(string $level, int $level_num = null) { if ($level_num === null) $level_num = Logger::getLevelNumeric($level); return $level_num >= $this->min_level; }
[ "public", "function", "isLevelEnabled", "(", "string", "$", "level", ",", "int", "$", "level_num", "=", "null", ")", "{", "if", "(", "$", "level_num", "===", "null", ")", "$", "level_num", "=", "Logger", "::", "getLevelNumeric", "(", "$", "level", ")", ...
Return if a message of a specific level would be accepted @param string $level The LogLevel @param int $level_num The level as int, with 0 being DEBUG and 8 being EMERGENCY. When omitted, it is obtained from Logger. @return bool True if a message with this level would be accepted, false it it would be dropped.
[ "Return", "if", "a", "message", "of", "a", "specific", "level", "would", "be", "accepted" ]
88252c5052089fdcc5dae466d1ad5889bb2b735f
https://github.com/Wedeto/Log/blob/88252c5052089fdcc5dae466d1ad5889bb2b735f/src/Writer/AbstractWriter.php#L71-L76
24,776
Stinger-Soft/DoctrineCommons
src/StingerSoft/DoctrineCommons/Utils/DoctrineFunctions.php
DoctrineFunctions.getAllMetadata
protected function getAllMetadata($managerName = null) { if(!$this->allMetadata) { $this->allMetadata = $this->registry->getManager($managerName)->getMetadataFactory()->getAllMetadata(); } return $this->allMetadata; }
php
protected function getAllMetadata($managerName = null) { if(!$this->allMetadata) { $this->allMetadata = $this->registry->getManager($managerName)->getMetadataFactory()->getAllMetadata(); } return $this->allMetadata; }
[ "protected", "function", "getAllMetadata", "(", "$", "managerName", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "allMetadata", ")", "{", "$", "this", "->", "allMetadata", "=", "$", "this", "->", "registry", "->", "getManager", "(", "$", "...
Returns all management class metadata @return ClassMetadata[]
[ "Returns", "all", "management", "class", "metadata" ]
1f0dd56a94654c8de63927d7eec2175aab3cf809
https://github.com/Stinger-Soft/DoctrineCommons/blob/1f0dd56a94654c8de63927d7eec2175aab3cf809/src/StingerSoft/DoctrineCommons/Utils/DoctrineFunctions.php#L226-L231
24,777
KDF5000/EasyThink
src/ThinkPHP/Library/Think/Upload/Driver/Bcs/requestcore.php
BCS_RequestCore.isBaeEnv
private function isBaeEnv() { if (isset ( $_SERVER ['HTTP_HOST'] )) { $host = $_SERVER ['HTTP_HOST']; $pos = strpos ( $host, '.' ); if ($pos !== false) { $substr = substr ( $host, $pos + 1 ); if ($substr == 'duapp.com') { return true; } } } if (isset ( $_SERVER ["HTTP_BAE_LOGID"] )) {...
php
private function isBaeEnv() { if (isset ( $_SERVER ['HTTP_HOST'] )) { $host = $_SERVER ['HTTP_HOST']; $pos = strpos ( $host, '.' ); if ($pos !== false) { $substr = substr ( $host, $pos + 1 ); if ($substr == 'duapp.com') { return true; } } } if (isset ( $_SERVER ["HTTP_BAE_LOGID"] )) {...
[ "private", "function", "isBaeEnv", "(", ")", "{", "if", "(", "isset", "(", "$", "_SERVER", "[", "'HTTP_HOST'", "]", ")", ")", "{", "$", "host", "=", "$", "_SERVER", "[", "'HTTP_HOST'", "]", ";", "$", "pos", "=", "strpos", "(", "$", "host", ",", "...
is the environment BAE? @return boolean the result of the answer
[ "is", "the", "environment", "BAE?" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Think/Upload/Driver/Bcs/requestcore.php#L590-L606
24,778
werx/core
src/Config.php
Config.getEnvironment
public function getEnvironment() { $environment_file = $this->resolvePath('config/environment'); if (file_exists($environment_file)) { $environment = trim(file_get_contents($environment_file)); } else { $environment = 'local'; } return $environment; }
php
public function getEnvironment() { $environment_file = $this->resolvePath('config/environment'); if (file_exists($environment_file)) { $environment = trim(file_get_contents($environment_file)); } else { $environment = 'local'; } return $environment; }
[ "public", "function", "getEnvironment", "(", ")", "{", "$", "environment_file", "=", "$", "this", "->", "resolvePath", "(", "'config/environment'", ")", ";", "if", "(", "file_exists", "(", "$", "environment_file", ")", ")", "{", "$", "environment", "=", "tri...
What environment are we running in? Local? Development? Production? @return string
[ "What", "environment", "are", "we", "running", "in?", "Local?", "Development?", "Production?" ]
9ab7a9f7a8c02e1d41ca40301afada8129ea0a79
https://github.com/werx/core/blob/9ab7a9f7a8c02e1d41ca40301afada8129ea0a79/src/Config.php#L58-L69
24,779
werx/core
src/Config.php
Config.getBaseUrl
public function getBaseUrl($include_script_name = false) { $this->config->load('config'); $base_url = $this->config->get('base_url'); if (empty($base_url)) { // No base_url defined in the config. Work it out based on server name. // This won't work if the app is running behind a proxied URL. $protocol ...
php
public function getBaseUrl($include_script_name = false) { $this->config->load('config'); $base_url = $this->config->get('base_url'); if (empty($base_url)) { // No base_url defined in the config. Work it out based on server name. // This won't work if the app is running behind a proxied URL. $protocol ...
[ "public", "function", "getBaseUrl", "(", "$", "include_script_name", "=", "false", ")", "{", "$", "this", "->", "config", "->", "load", "(", "'config'", ")", ";", "$", "base_url", "=", "$", "this", "->", "config", "->", "get", "(", "'base_url'", ")", "...
Get the the base url of our app @param bool $include_script_name Should we include the filename (index.php)? @return null|string The full URL to our app.
[ "Get", "the", "the", "base", "url", "of", "our", "app" ]
9ab7a9f7a8c02e1d41ca40301afada8129ea0a79
https://github.com/werx/core/blob/9ab7a9f7a8c02e1d41ca40301afada8129ea0a79/src/Config.php#L77-L103
24,780
opensourcerefinery/vicus
src/Provider/EnvironmentServiceProvider.php
EnvironmentServiceProvider.determine
private function determine() { if (false !== $this->filepath && true === is_readable($this->filepath . '/' . $this->filename)) { return strtolower(trim(file_get_contents($this->filepath . '/' . $this->filename))); } elseif (null !== getenv($this->variable)) { return getenv($this->variable); } else { re...
php
private function determine() { if (false !== $this->filepath && true === is_readable($this->filepath . '/' . $this->filename)) { return strtolower(trim(file_get_contents($this->filepath . '/' . $this->filename))); } elseif (null !== getenv($this->variable)) { return getenv($this->variable); } else { re...
[ "private", "function", "determine", "(", ")", "{", "if", "(", "false", "!==", "$", "this", "->", "filepath", "&&", "true", "===", "is_readable", "(", "$", "this", "->", "filepath", ".", "'/'", ".", "$", "this", "->", "filename", ")", ")", "{", "retur...
Dertermines the runtime environment by checking for a file or an environment variable containing the applications runtime environment name. If both checks fail it will return false. @return string|bool
[ "Dertermines", "the", "runtime", "environment", "by", "checking", "for", "a", "file", "or", "an", "environment", "variable", "containing", "the", "applications", "runtime", "environment", "name", ".", "If", "both", "checks", "fail", "it", "will", "return", "fals...
5be93d75bf6ab8009a299e9946c8333f0017fa3e
https://github.com/opensourcerefinery/vicus/blob/5be93d75bf6ab8009a299e9946c8333f0017fa3e/src/Provider/EnvironmentServiceProvider.php#L86-L96
24,781
netgen/site-legacy-bundle
bundle/Composer/ScriptHandler.php
ScriptHandler.installLegacySymlinks
public static function installLegacySymlinks(Event $event): void { $options = static::getOptions($event); $consoleDir = static::getConsoleDir($event, 'install legacy symlinks'); static::executeCommand($event, $consoleDir, 'ngsite:symlink:legacy', $options['process-timeout']); }
php
public static function installLegacySymlinks(Event $event): void { $options = static::getOptions($event); $consoleDir = static::getConsoleDir($event, 'install legacy symlinks'); static::executeCommand($event, $consoleDir, 'ngsite:symlink:legacy', $options['process-timeout']); }
[ "public", "static", "function", "installLegacySymlinks", "(", "Event", "$", "event", ")", ":", "void", "{", "$", "options", "=", "static", "::", "getOptions", "(", "$", "event", ")", ";", "$", "consoleDir", "=", "static", "::", "getConsoleDir", "(", "$", ...
Symlinks legacy siteaccesses and various other legacy files to their proper locations.
[ "Symlinks", "legacy", "siteaccesses", "and", "various", "other", "legacy", "files", "to", "their", "proper", "locations", "." ]
943224cdee28cfb9ef07854c11c91d060456b394
https://github.com/netgen/site-legacy-bundle/blob/943224cdee28cfb9ef07854c11c91d060456b394/bundle/Composer/ScriptHandler.php#L15-L21
24,782
Retentio/Boomgo
src/Boomgo/Mapper/MapperProvider.php
MapperProvider.createInstance
protected function createInstance(\ReflectionClass $reflectedClass) { $constructor = $reflectedClass->getConstructor(); if ($constructor && $constructor->getNumberOfRequiredParameters() > 0) { throw new \RuntimeException('Unable to hydrate an object requiring constructor param'); ...
php
protected function createInstance(\ReflectionClass $reflectedClass) { $constructor = $reflectedClass->getConstructor(); if ($constructor && $constructor->getNumberOfRequiredParameters() > 0) { throw new \RuntimeException('Unable to hydrate an object requiring constructor param'); ...
[ "protected", "function", "createInstance", "(", "\\", "ReflectionClass", "$", "reflectedClass", ")", "{", "$", "constructor", "=", "$", "reflectedClass", "->", "getConstructor", "(", ")", ";", "if", "(", "$", "constructor", "&&", "$", "constructor", "->", "get...
Create an instance from a Reflected class @param ReflectionClass $reflectedClass @throws RuntimeException If constructor requires parameter @return mixed
[ "Create", "an", "instance", "from", "a", "Reflected", "class" ]
95cc53777425dd76cd0034046fa4f9e72c04d73a
https://github.com/Retentio/Boomgo/blob/95cc53777425dd76cd0034046fa4f9e72c04d73a/src/Boomgo/Mapper/MapperProvider.php#L33-L42
24,783
Retentio/Boomgo
src/Boomgo/Mapper/MapperProvider.php
MapperProvider.normalize
protected function normalize($data) { if (null === $data || is_scalar($data)) { return $data; } if (is_array($data)) { foreach ($data as $key => $val) { $data[$key] = $this->normalize($val); } return $data; } ...
php
protected function normalize($data) { if (null === $data || is_scalar($data)) { return $data; } if (is_array($data)) { foreach ($data as $key => $val) { $data[$key] = $this->normalize($val); } return $data; } ...
[ "protected", "function", "normalize", "(", "$", "data", ")", "{", "if", "(", "null", "===", "$", "data", "||", "is_scalar", "(", "$", "data", ")", ")", "{", "return", "$", "data", ";", "}", "if", "(", "is_array", "(", "$", "data", ")", ")", "{", ...
Normalize php data for mongo This code chunk was inspired by the Symfony framework and is subject to the MIT license. Please see the LICENCE at https://github.com/symfony/symfony (c) Fabien Potencier <fabien@symfony.com> Author Nils Adermann <naderman@naderman.de> @param mixed $data @return mixed
[ "Normalize", "php", "data", "for", "mongo" ]
95cc53777425dd76cd0034046fa4f9e72c04d73a
https://github.com/Retentio/Boomgo/blob/95cc53777425dd76cd0034046fa4f9e72c04d73a/src/Boomgo/Mapper/MapperProvider.php#L58-L73
24,784
Retentio/Boomgo
src/Boomgo/Mapper/MapperProvider.php
MapperProvider.serializeEmbeddedCollection
protected function serializeEmbeddedCollection(MapperInterface $mapper, array $collection) { $data = array(); foreach ($collection as $object) { $data[] = $mapper->serialize($object); } return $data; }
php
protected function serializeEmbeddedCollection(MapperInterface $mapper, array $collection) { $data = array(); foreach ($collection as $object) { $data[] = $mapper->serialize($object); } return $data; }
[ "protected", "function", "serializeEmbeddedCollection", "(", "MapperInterface", "$", "mapper", ",", "array", "$", "collection", ")", "{", "$", "data", "=", "array", "(", ")", ";", "foreach", "(", "$", "collection", "as", "$", "object", ")", "{", "$", "data...
Serialize an embedded collection Return a collection of hydrated objects @param MapperInterface $mapper @param array $collection @return array
[ "Serialize", "an", "embedded", "collection" ]
95cc53777425dd76cd0034046fa4f9e72c04d73a
https://github.com/Retentio/Boomgo/blob/95cc53777425dd76cd0034046fa4f9e72c04d73a/src/Boomgo/Mapper/MapperProvider.php#L85-L93
24,785
Retentio/Boomgo
src/Boomgo/Mapper/MapperProvider.php
MapperProvider.unserializeEmbeddedCollection
protected function unserializeEmbeddedCollection(MapperInterface $mapper, array $data) { $collection = array(); foreach ($data as $document) { $collection[] = $mapper->unserialize($document); } return $collection; }
php
protected function unserializeEmbeddedCollection(MapperInterface $mapper, array $data) { $collection = array(); foreach ($data as $document) { $collection[] = $mapper->unserialize($document); } return $collection; }
[ "protected", "function", "unserializeEmbeddedCollection", "(", "MapperInterface", "$", "mapper", ",", "array", "$", "data", ")", "{", "$", "collection", "=", "array", "(", ")", ";", "foreach", "(", "$", "data", "as", "$", "document", ")", "{", "$", "collec...
Unserialize an embedded collection Return a collection of serialized objects (arrays) @param MapperInterface $mapper @param array $data @return array
[ "Unserialize", "an", "embedded", "collection" ]
95cc53777425dd76cd0034046fa4f9e72c04d73a
https://github.com/Retentio/Boomgo/blob/95cc53777425dd76cd0034046fa4f9e72c04d73a/src/Boomgo/Mapper/MapperProvider.php#L105-L113
24,786
MBHFramework/mbh-rest
Mbh/DefaultServicesProvider.php
DefaultServicesProvider.register
public function register(ContainerInterface $container) { if (! isset($container['session'])) { $container['session'] = function (ContainerInterface $container) { return new Session; }; } if (! isset($container['router'])) { /** ...
php
public function register(ContainerInterface $container) { if (! isset($container['session'])) { $container['session'] = function (ContainerInterface $container) { return new Session; }; } if (! isset($container['router'])) { /** ...
[ "public", "function", "register", "(", "ContainerInterface", "$", "container", ")", "{", "if", "(", "!", "isset", "(", "$", "container", "[", "'session'", "]", ")", ")", "{", "$", "container", "[", "'session'", "]", "=", "function", "(", "ContainerInterfac...
Register Mbh's default services. @param Container $container A DI container implementing ArrayAccess and container-interop.
[ "Register", "Mbh", "s", "default", "services", "." ]
e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83
https://github.com/MBHFramework/mbh-rest/blob/e23b4e66dc2b8da35e06312dcfdba41c4cfc2c83/Mbh/DefaultServicesProvider.php#L28-L62
24,787
agentmedia/phine-core
src/Core/Modules/Backend/ModuleForm.php
ModuleForm.AddModuleTypeOption
private function AddModuleTypeOption(Select $select, $type) { if ($type != 'BuiltIn-Container' || (!Request::GetData('container') && Container::Schema()->Count() > 0)) { $select->AddOption($type, Trans($type)); } }
php
private function AddModuleTypeOption(Select $select, $type) { if ($type != 'BuiltIn-Container' || (!Request::GetData('container') && Container::Schema()->Count() > 0)) { $select->AddOption($type, Trans($type)); } }
[ "private", "function", "AddModuleTypeOption", "(", "Select", "$", "select", ",", "$", "type", ")", "{", "if", "(", "$", "type", "!=", "'BuiltIn-Container'", "||", "(", "!", "Request", "::", "GetData", "(", "'container'", ")", "&&", "Container", "::", "Sche...
Adds the module type option, if allowed @param Select $select The select box @param string $type The module type
[ "Adds", "the", "module", "type", "option", "if", "allowed" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Modules/Backend/ModuleForm.php#L52-L59
24,788
TiMESPLiNTER/tsFramework
src/ch/timesplinter/logger/Logger.php
Logger.warn
public function warn($msg) { $this->mailMessage(self::LEVEL_WARN, $msg); if($this->checkLevel($this->loglevels, self::LEVEL_WARN) !== true) return; $this->writeMessage(self::LEVEL_WARN, $msg); }
php
public function warn($msg) { $this->mailMessage(self::LEVEL_WARN, $msg); if($this->checkLevel($this->loglevels, self::LEVEL_WARN) !== true) return; $this->writeMessage(self::LEVEL_WARN, $msg); }
[ "public", "function", "warn", "(", "$", "msg", ")", "{", "$", "this", "->", "mailMessage", "(", "self", "::", "LEVEL_WARN", ",", "$", "msg", ")", ";", "if", "(", "$", "this", "->", "checkLevel", "(", "$", "this", "->", "loglevels", ",", "self", "::...
Logs a warning @param type $msg
[ "Logs", "a", "warning" ]
b3b9fd98f6d456a9e571015877ecca203786fd0c
https://github.com/TiMESPLiNTER/tsFramework/blob/b3b9fd98f6d456a9e571015877ecca203786fd0c/src/ch/timesplinter/logger/Logger.php#L101-L108
24,789
TiMESPLiNTER/tsFramework
src/ch/timesplinter/logger/Logger.php
Logger.info
public function info($msg) { $this->mailMessage(self::LEVEL_INFO, $msg); if($this->checkLevel($this->loglevels, self::LEVEL_INFO) !== true) return; $this->writeMessage(self::LEVEL_INFO, $msg); }
php
public function info($msg) { $this->mailMessage(self::LEVEL_INFO, $msg); if($this->checkLevel($this->loglevels, self::LEVEL_INFO) !== true) return; $this->writeMessage(self::LEVEL_INFO, $msg); }
[ "public", "function", "info", "(", "$", "msg", ")", "{", "$", "this", "->", "mailMessage", "(", "self", "::", "LEVEL_INFO", ",", "$", "msg", ")", ";", "if", "(", "$", "this", "->", "checkLevel", "(", "$", "this", "->", "loglevels", ",", "self", "::...
Logs an information @param string $msg @return type
[ "Logs", "an", "information" ]
b3b9fd98f6d456a9e571015877ecca203786fd0c
https://github.com/TiMESPLiNTER/tsFramework/blob/b3b9fd98f6d456a9e571015877ecca203786fd0c/src/ch/timesplinter/logger/Logger.php#L115-L122
24,790
phpffcms/ffcms-core
src/Traits/ClassTools.php
ClassTools.createStringClassSnapshotHash
public function createStringClassSnapshotHash() { $hash = null; foreach ($this as $property => $value) { $hash = md5($hash . $property . '=' . $value); } return $hash; }
php
public function createStringClassSnapshotHash() { $hash = null; foreach ($this as $property => $value) { $hash = md5($hash . $property . '=' . $value); } return $hash; }
[ "public", "function", "createStringClassSnapshotHash", "(", ")", "{", "$", "hash", "=", "null", ";", "foreach", "(", "$", "this", "as", "$", "property", "=>", "$", "value", ")", "{", "$", "hash", "=", "md5", "(", "$", "hash", ".", "$", "property", "....
Create hash string from current class properties and itself values. This method is good stuff for caching dynamic instances @return string|null
[ "Create", "hash", "string", "from", "current", "class", "properties", "and", "itself", "values", ".", "This", "method", "is", "good", "stuff", "for", "caching", "dynamic", "instances" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Traits/ClassTools.php#L16-L23
24,791
phpffcms/ffcms-core
src/Traits/ClassTools.php
ClassTools.getMethodRequiredArgCount
public function getMethodRequiredArgCount($class, string $method): int { $instance = new \ReflectionMethod($class, $method); $count = 0; // calculate method defined arguments count foreach ($instance->getParameters() as $arg) { if (!$arg->isOptional()) { $...
php
public function getMethodRequiredArgCount($class, string $method): int { $instance = new \ReflectionMethod($class, $method); $count = 0; // calculate method defined arguments count foreach ($instance->getParameters() as $arg) { if (!$arg->isOptional()) { $...
[ "public", "function", "getMethodRequiredArgCount", "(", "$", "class", ",", "string", "$", "method", ")", ":", "int", "{", "$", "instance", "=", "new", "\\", "ReflectionMethod", "(", "$", "class", ",", "$", "method", ")", ";", "$", "count", "=", "0", ";...
Get method required arguments count @param $class @param string $method @return int
[ "Get", "method", "required", "arguments", "count" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Traits/ClassTools.php#L31-L43
24,792
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/DocumentManager.php
DocumentManager.contains
public function contains($document) { if (!is_object($document)) { throw new \InvalidArgumentException(gettype($document)); } return $this->unitOfWork->isScheduledForInsert($document) || $this->unitOfWork->isInIdentityMap($document) && !$this->unitOfWork-...
php
public function contains($document) { if (!is_object($document)) { throw new \InvalidArgumentException(gettype($document)); } return $this->unitOfWork->isScheduledForInsert($document) || $this->unitOfWork->isInIdentityMap($document) && !$this->unitOfWork-...
[ "public", "function", "contains", "(", "$", "document", ")", "{", "if", "(", "!", "is_object", "(", "$", "document", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "gettype", "(", "$", "document", ")", ")", ";", "}", "return", "$...
Determines whether a document instance is managed in this DocumentManager. @param object $document @throws \InvalidArgumentException When the $document param is not an object @return bool TRUE if this DocumentManager currently manages the given document, FALSE otherwise.
[ "Determines", "whether", "a", "document", "instance", "is", "managed", "in", "this", "DocumentManager", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/DocumentManager.php#L207-L216
24,793
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/DocumentManager.php
DocumentManager.getFilterCollection
public function getFilterCollection() { if (null === $this->filterCollection) { $this->filterCollection = new Filter\FilterCollection($this); } return $this->filterCollection; }
php
public function getFilterCollection() { if (null === $this->filterCollection) { $this->filterCollection = new Filter\FilterCollection($this); } return $this->filterCollection; }
[ "public", "function", "getFilterCollection", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "filterCollection", ")", "{", "$", "this", "->", "filterCollection", "=", "new", "Filter", "\\", "FilterCollection", "(", "$", "this", ")", ";", "}", ...
Gets the filter collection. @return Filter\FilterCollection The active filter collection.
[ "Gets", "the", "filter", "collection", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/DocumentManager.php#L356-L363
24,794
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/DocumentManager.php
DocumentManager.persist
public function persist($document) { if (!is_object($document)) { throw new \InvalidArgumentException(gettype($document)); } $this->errorIfClosed(); $this->unitOfWork->persist($document); }
php
public function persist($document) { if (!is_object($document)) { throw new \InvalidArgumentException(gettype($document)); } $this->errorIfClosed(); $this->unitOfWork->persist($document); }
[ "public", "function", "persist", "(", "$", "document", ")", "{", "if", "(", "!", "is_object", "(", "$", "document", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "gettype", "(", "$", "document", ")", ")", ";", "}", "$", "this", ...
Tells the DocumentManager to make an instance managed and persistent. The document will be entered into the database at or before transaction commit or as a result of the flush operation. NOTE: The persist operation always considers documents that are not yet known to this DocumentManager as NEW. Do not pass detached...
[ "Tells", "the", "DocumentManager", "to", "make", "an", "instance", "managed", "and", "persistent", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/DocumentManager.php#L500-L507
24,795
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/DocumentManager.php
DocumentManager.refresh
public function refresh($document) { if (!is_object($document)) { throw new \InvalidArgumentException(gettype($document)); } $this->errorIfClosed(); $this->unitOfWork->refresh($document); }
php
public function refresh($document) { if (!is_object($document)) { throw new \InvalidArgumentException(gettype($document)); } $this->errorIfClosed(); $this->unitOfWork->refresh($document); }
[ "public", "function", "refresh", "(", "$", "document", ")", "{", "if", "(", "!", "is_object", "(", "$", "document", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "gettype", "(", "$", "document", ")", ")", ";", "}", "$", "this", ...
Refreshes the persistent state of a document from the database, overriding any local changes that have not yet been persisted. @param object $document The document to refresh. @throws \InvalidArgumentException When the given $document param is not an object
[ "Refreshes", "the", "persistent", "state", "of", "a", "document", "from", "the", "database", "overriding", "any", "local", "changes", "that", "have", "not", "yet", "been", "persisted", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/DocumentManager.php#L517-L524
24,796
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/DocumentManager.php
DocumentManager.remove
public function remove($document) { if (!is_object($document)) { throw new \InvalidArgumentException(gettype($document)); } $this->errorIfClosed(); $this->unitOfWork->remove($document); }
php
public function remove($document) { if (!is_object($document)) { throw new \InvalidArgumentException(gettype($document)); } $this->errorIfClosed(); $this->unitOfWork->remove($document); }
[ "public", "function", "remove", "(", "$", "document", ")", "{", "if", "(", "!", "is_object", "(", "$", "document", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "gettype", "(", "$", "document", ")", ")", ";", "}", "$", "this", ...
Removes a document instance. A removed document will be removed from the database at or before transaction commit or as a result of the flush operation. @param object $document The document instance to remove. @throws \InvalidArgumentException when the $document param is not an object
[ "Removes", "a", "document", "instance", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/DocumentManager.php#L536-L543
24,797
jenskooij/cloudcontrol
src/storage/storage/BricksStorage.php
BricksStorage.addBrick
public function addBrick($postValues) { $brickObject = BrickFactory::createBrickFromPostValues($postValues); $bricks = $this->repository->bricks; $bricks[] = $brickObject; $this->repository->bricks = $bricks; $this->save(); }
php
public function addBrick($postValues) { $brickObject = BrickFactory::createBrickFromPostValues($postValues); $bricks = $this->repository->bricks; $bricks[] = $brickObject; $this->repository->bricks = $bricks; $this->save(); }
[ "public", "function", "addBrick", "(", "$", "postValues", ")", "{", "$", "brickObject", "=", "BrickFactory", "::", "createBrickFromPostValues", "(", "$", "postValues", ")", ";", "$", "bricks", "=", "$", "this", "->", "repository", "->", "bricks", ";", "$", ...
Add a brick @param $postValues @throws \Exception
[ "Add", "a", "brick" ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/storage/storage/BricksStorage.php#L28-L37
24,798
jenskooij/cloudcontrol
src/storage/storage/BricksStorage.php
BricksStorage.getBrickBySlug
public function getBrickBySlug($slug) { $bricks = $this->repository->bricks; foreach ($bricks as $brick) { if ($brick->slug == $slug) { return $brick; } } return null; }
php
public function getBrickBySlug($slug) { $bricks = $this->repository->bricks; foreach ($bricks as $brick) { if ($brick->slug == $slug) { return $brick; } } return null; }
[ "public", "function", "getBrickBySlug", "(", "$", "slug", ")", "{", "$", "bricks", "=", "$", "this", "->", "repository", "->", "bricks", ";", "foreach", "(", "$", "bricks", "as", "$", "brick", ")", "{", "if", "(", "$", "brick", "->", "slug", "==", ...
Get a brick by its slug @param $slug @return \stdClass
[ "Get", "a", "brick", "by", "its", "slug" ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/storage/storage/BricksStorage.php#L46-L56
24,799
jenskooij/cloudcontrol
src/storage/storage/BricksStorage.php
BricksStorage.saveBrick
public function saveBrick($slug, $postValues) { $brickObject = BrickFactory::createBrickFromPostValues($postValues); $bricks = $this->repository->bricks; foreach ($bricks as $key => $brick) { if ($brick->slug == $slug) { $bricks[$key] = $brickObject; ...
php
public function saveBrick($slug, $postValues) { $brickObject = BrickFactory::createBrickFromPostValues($postValues); $bricks = $this->repository->bricks; foreach ($bricks as $key => $brick) { if ($brick->slug == $slug) { $bricks[$key] = $brickObject; ...
[ "public", "function", "saveBrick", "(", "$", "slug", ",", "$", "postValues", ")", "{", "$", "brickObject", "=", "BrickFactory", "::", "createBrickFromPostValues", "(", "$", "postValues", ")", ";", "$", "bricks", "=", "$", "this", "->", "repository", "->", ...
Save changes to a brick @param $slug @param $postValues @throws \Exception
[ "Save", "changes", "to", "a", "brick" ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/storage/storage/BricksStorage.php#L66-L78