repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
creios/creiwork-framework | src/Util/JsonValidator.php | JsonValidator.validateJson | public function validateJson(string $json, string $schemaName): ValidationResult
{
$schemaDir = $this->config->get('schema-dir');
$schemaPath = $this->configDirectoryPath.$schemaDir.'/'.$schemaName.'.json';
if(!file_exists($schemaPath)){
throw new FileNotFoundException("File $sch... | php | public function validateJson(string $json, string $schemaName): ValidationResult
{
$schemaDir = $this->config->get('schema-dir');
$schemaPath = $this->configDirectoryPath.$schemaDir.'/'.$schemaName.'.json';
if(!file_exists($schemaPath)){
throw new FileNotFoundException("File $sch... | [
"public",
"function",
"validateJson",
"(",
"string",
"$",
"json",
",",
"string",
"$",
"schemaName",
")",
":",
"ValidationResult",
"{",
"$",
"schemaDir",
"=",
"$",
"this",
"->",
"config",
"->",
"get",
"(",
"'schema-dir'",
")",
";",
"$",
"schemaPath",
"=",
... | Validates JSON strings against a schema.
@param string $json
@param string $schemaName Name of the .json file providing the schema (without file extension)
@return ValidationResult | [
"Validates",
"JSON",
"strings",
"against",
"a",
"schema",
"."
] | train | https://github.com/creios/creiwork-framework/blob/5089578b44ef6af725ab0c8a2dfe691bfe07ffb6/src/Util/JsonValidator.php#L84-L106 |
agentmedia/phine-core | src/Core/Logic/Installation/BundleInstaller.php | BundleInstaller.ExecuteSql | function ExecuteSql()
{
$versionCompare = version_compare($this->installedVersion, $this->manifest->Version());
if ($versionCompare > 0)
{
$bundle = $this->manifest->BundleName();
throw new \Exception("Error instaling bundle $bundle: Previously installed versi... | php | function ExecuteSql()
{
$versionCompare = version_compare($this->installedVersion, $this->manifest->Version());
if ($versionCompare > 0)
{
$bundle = $this->manifest->BundleName();
throw new \Exception("Error instaling bundle $bundle: Previously installed versi... | [
"function",
"ExecuteSql",
"(",
")",
"{",
"$",
"versionCompare",
"=",
"version_compare",
"(",
"$",
"this",
"->",
"installedVersion",
",",
"$",
"this",
"->",
"manifest",
"->",
"Version",
"(",
")",
")",
";",
"if",
"(",
"$",
"versionCompare",
">",
"0",
")",
... | Executes all necessary sql scripts | [
"Executes",
"all",
"necessary",
"sql",
"scripts"
] | train | https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Installation/BundleInstaller.php#L52-L71 |
agentmedia/phine-core | src/Core/Logic/Installation/BundleInstaller.php | BundleInstaller.ExecuteScripts | private function ExecuteScripts($engineFolder)
{
$files = $this->SortFilesByVersion(Folder::GetFiles($engineFolder));
$completeSql = '';
foreach ($files as $file)
{
$sqlFile = Path::Combine($engineFolder, $file);
$completeSql .= "\r\n" . File::GetCont... | php | private function ExecuteScripts($engineFolder)
{
$files = $this->SortFilesByVersion(Folder::GetFiles($engineFolder));
$completeSql = '';
foreach ($files as $file)
{
$sqlFile = Path::Combine($engineFolder, $file);
$completeSql .= "\r\n" . File::GetCont... | [
"private",
"function",
"ExecuteScripts",
"(",
"$",
"engineFolder",
")",
"{",
"$",
"files",
"=",
"$",
"this",
"->",
"SortFilesByVersion",
"(",
"Folder",
"::",
"GetFiles",
"(",
"$",
"engineFolder",
")",
")",
";",
"$",
"completeSql",
"=",
"''",
";",
"foreach"... | Executes all necessary scripts in the engine folder
@param string $engineFolder The folder
@throws \Exception Raises error if any of the scripts fail | [
"Executes",
"all",
"necessary",
"scripts",
"in",
"the",
"engine",
"folder"
] | train | https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Installation/BundleInstaller.php#L78-L101 |
agentmedia/phine-core | src/Core/Logic/Installation/BundleInstaller.php | BundleInstaller.CleanForeignKeys | private function CleanForeignKeys($table)
{
$foreignKeys = $this->connection->GetForeignKeys($table);
foreach ($foreignKeys as $foreignKey)
{
$this->connection->DropForeignKey($table, $foreignKey);
}
} | php | private function CleanForeignKeys($table)
{
$foreignKeys = $this->connection->GetForeignKeys($table);
foreach ($foreignKeys as $foreignKey)
{
$this->connection->DropForeignKey($table, $foreignKey);
}
} | [
"private",
"function",
"CleanForeignKeys",
"(",
"$",
"table",
")",
"{",
"$",
"foreignKeys",
"=",
"$",
"this",
"->",
"connection",
"->",
"GetForeignKeys",
"(",
"$",
"table",
")",
";",
"foreach",
"(",
"$",
"foreignKeys",
"as",
"$",
"foreignKey",
")",
"{",
... | Cleans all foreign keys of a table
@param strign $table The table name | [
"Cleans",
"all",
"foreign",
"keys",
"of",
"a",
"table"
] | train | https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Installation/BundleInstaller.php#L119-L126 |
agentmedia/phine-core | src/Core/Logic/Installation/BundleInstaller.php | BundleInstaller.SortFilesByVersion | private function SortFilesByVersion(array $files)
{
$result = array();
$foreignKeysFile = '';
foreach ($files as $file)
{
if ($file == 'foreign-keys.sql')
{
$foreignKeysFile = $file;
continue;
}
$version ... | php | private function SortFilesByVersion(array $files)
{
$result = array();
$foreignKeysFile = '';
foreach ($files as $file)
{
if ($file == 'foreign-keys.sql')
{
$foreignKeysFile = $file;
continue;
}
$version ... | [
"private",
"function",
"SortFilesByVersion",
"(",
"array",
"$",
"files",
")",
"{",
"$",
"result",
"=",
"array",
"(",
")",
";",
"$",
"foreignKeysFile",
"=",
"''",
";",
"foreach",
"(",
"$",
"files",
"as",
"$",
"file",
")",
"{",
"if",
"(",
"$",
"file",
... | Sorts files by version
@param string[] $files The files
@return string[] Returns the sorted files | [
"Sorts",
"files",
"by",
"version"
] | train | https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Installation/BundleInstaller.php#L156-L180 |
yuncms/yii2-oauth2 | frontend/controllers/ClientController.php | ClientController.actionIndex | public function actionIndex()
{
$query = Client::find()->where(['user_id' => Yii::$app->user->id])->orderBy(['created_at' => SORT_DESC]);
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
return $this->render('index', [
'dataProvider' => $dataPro... | php | public function actionIndex()
{
$query = Client::find()->where(['user_id' => Yii::$app->user->id])->orderBy(['created_at' => SORT_DESC]);
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
return $this->render('index', [
'dataProvider' => $dataPro... | [
"public",
"function",
"actionIndex",
"(",
")",
"{",
"$",
"query",
"=",
"Client",
"::",
"find",
"(",
")",
"->",
"where",
"(",
"[",
"'user_id'",
"=>",
"Yii",
"::",
"$",
"app",
"->",
"user",
"->",
"id",
"]",
")",
"->",
"orderBy",
"(",
"[",
"'created_a... | Lists all App models.
@return mixed | [
"Lists",
"all",
"App",
"models",
"."
] | train | https://github.com/yuncms/yii2-oauth2/blob/7fb41fc56d4a6a5f4107aec5429580729257ed3a/frontend/controllers/ClientController.php#L53-L62 |
yuncms/yii2-oauth2 | frontend/controllers/ClientController.php | ClientController.actionCreate | public function actionCreate()
{
$model = new Client();
if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
Yii::$app->response->format = Response::FORMAT_JSON;
return ActiveForm::validate($model);
} else if ($model->load(Yii::$app->request->... | php | public function actionCreate()
{
$model = new Client();
if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
Yii::$app->response->format = Response::FORMAT_JSON;
return ActiveForm::validate($model);
} else if ($model->load(Yii::$app->request->... | [
"public",
"function",
"actionCreate",
"(",
")",
"{",
"$",
"model",
"=",
"new",
"Client",
"(",
")",
";",
"if",
"(",
"Yii",
"::",
"$",
"app",
"->",
"request",
"->",
"isAjax",
"&&",
"$",
"model",
"->",
"load",
"(",
"Yii",
"::",
"$",
"app",
"->",
"re... | Creates a new Rest model.
If creation is successful, the browser will be redirected to the 'view' page.
@return mixed | [
"Creates",
"a",
"new",
"Rest",
"model",
".",
"If",
"creation",
"is",
"successful",
"the",
"browser",
"will",
"be",
"redirected",
"to",
"the",
"view",
"page",
"."
] | train | https://github.com/yuncms/yii2-oauth2/blob/7fb41fc56d4a6a5f4107aec5429580729257ed3a/frontend/controllers/ClientController.php#L69-L83 |
SysControllers/Admin | public/assets/global/plugins/kcfinder/lib/class_input.php | input.filter | public function filter($subject) {
if ($this->magic_quotes_gpc) {
if (is_array($subject)) {
foreach ($subject as $key => $val)
if (!preg_match('/^[a-z\d_]+$/si', $key))
unset($subject[$key]);
else
... | php | public function filter($subject) {
if ($this->magic_quotes_gpc) {
if (is_array($subject)) {
foreach ($subject as $key => $val)
if (!preg_match('/^[a-z\d_]+$/si', $key))
unset($subject[$key]);
else
... | [
"public",
"function",
"filter",
"(",
"$",
"subject",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"magic_quotes_gpc",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"subject",
")",
")",
"{",
"foreach",
"(",
"$",
"subject",
"as",
"$",
"key",
"=>",
"$",
"val"... | Filter the given subject. If magic_quotes_gpc and/or magic_quotes_sybase
ini settings are turned on, the method will remove backslashes from some
escaped characters. If the subject is an array, elements with non-
alphanumeric keys will be removed
@param mixed $subject
@return mixed | [
"Filter",
"the",
"given",
"subject",
".",
"If",
"magic_quotes_gpc",
"and",
"/",
"or",
"magic_quotes_sybase",
"ini",
"settings",
"are",
"turned",
"on",
"the",
"method",
"will",
"remove",
"backslashes",
"from",
"some",
"escaped",
"characters",
".",
"If",
"the",
... | train | https://github.com/SysControllers/Admin/blob/8f1df46aca422b87f2f522fbba610dcfa0c5f7f3/public/assets/global/plugins/kcfinder/lib/class_input.php#L67-L83 |
TiMESPLiNTER/tsFramework | src/ch/timesplinter/core/Core.php | Core.createHttpRequest | protected function createHttpRequest()
{
$protocol = (isset($_SERVER['HTTPS']) === true && $_SERVER['HTTPS'] === 'on') ? HttpRequest::PROTOCOL_HTTPS : HttpRequest::PROTOCOL_HTTP;
$uri = StringUtils::startsWith($_SERVER['REQUEST_URI'], '/index.php')?StringUtils::afterFirst($_SERVER['REQUEST_URI'], '/index.php'):$_S... | php | protected function createHttpRequest()
{
$protocol = (isset($_SERVER['HTTPS']) === true && $_SERVER['HTTPS'] === 'on') ? HttpRequest::PROTOCOL_HTTPS : HttpRequest::PROTOCOL_HTTP;
$uri = StringUtils::startsWith($_SERVER['REQUEST_URI'], '/index.php')?StringUtils::afterFirst($_SERVER['REQUEST_URI'], '/index.php'):$_S... | [
"protected",
"function",
"createHttpRequest",
"(",
")",
"{",
"$",
"protocol",
"=",
"(",
"isset",
"(",
"$",
"_SERVER",
"[",
"'HTTPS'",
"]",
")",
"===",
"true",
"&&",
"$",
"_SERVER",
"[",
"'HTTPS'",
"]",
"===",
"'on'",
")",
"?",
"HttpRequest",
"::",
"PRO... | Creates a HttpRequest object for the current request
@return HttpRequest | [
"Creates",
"a",
"HttpRequest",
"object",
"for",
"the",
"current",
"request"
] | train | https://github.com/TiMESPLiNTER/tsFramework/blob/b3b9fd98f6d456a9e571015877ecca203786fd0c/src/ch/timesplinter/core/Core.php#L95-L133 |
phospr/DoubleEntryBundle | Model/Journal.php | Journal.addPosting | public function addPosting(PostingInterface $posting)
{
$this->postings->add($posting);
$posting->setJournal($this);
} | php | public function addPosting(PostingInterface $posting)
{
$this->postings->add($posting);
$posting->setJournal($this);
} | [
"public",
"function",
"addPosting",
"(",
"PostingInterface",
"$",
"posting",
")",
"{",
"$",
"this",
"->",
"postings",
"->",
"add",
"(",
"$",
"posting",
")",
";",
"$",
"posting",
"->",
"setJournal",
"(",
"$",
"this",
")",
";",
"}"
] | Add posting
@author Tom Haskins-Vaughan <tom@tomhv.uk>
@since 0.8.0
@param PostingInterface $posting | [
"Add",
"posting"
] | train | https://github.com/phospr/DoubleEntryBundle/blob/d9c421f30922b461483731983c59beb26047fb7f/Model/Journal.php#L163-L167 |
phospr/DoubleEntryBundle | Model/Journal.php | Journal.post | public function post()
{
$this->setPostedAt(new \DateTime());
$this->ensureZeroSumOfPostings();
foreach ($this->getPostings() as $posting) {
$posting->post();
}
} | php | public function post()
{
$this->setPostedAt(new \DateTime());
$this->ensureZeroSumOfPostings();
foreach ($this->getPostings() as $posting) {
$posting->post();
}
} | [
"public",
"function",
"post",
"(",
")",
"{",
"$",
"this",
"->",
"setPostedAt",
"(",
"new",
"\\",
"DateTime",
"(",
")",
")",
";",
"$",
"this",
"->",
"ensureZeroSumOfPostings",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"getPostings",
"(",
")",
... | post()
Post all Postings for this Journal
@author Tom Haskins-Vaughan <tom@tomhv.uk>
@since 0.8.0 | [
"post",
"()"
] | train | https://github.com/phospr/DoubleEntryBundle/blob/d9c421f30922b461483731983c59beb26047fb7f/Model/Journal.php#L379-L388 |
phospr/DoubleEntryBundle | Model/Journal.php | Journal.debit | public function debit(Account $account, $amount)
{
// Income and Liabilities need the sign changed
if ($account->isIncome() || $account->isLiability()) {
$amount = -1*$amount;
}
$posting = new Posting();
$posting->setAccount($account);
$posting->setAmount($... | php | public function debit(Account $account, $amount)
{
// Income and Liabilities need the sign changed
if ($account->isIncome() || $account->isLiability()) {
$amount = -1*$amount;
}
$posting = new Posting();
$posting->setAccount($account);
$posting->setAmount($... | [
"public",
"function",
"debit",
"(",
"Account",
"$",
"account",
",",
"$",
"amount",
")",
"{",
"// Income and Liabilities need the sign changed",
"if",
"(",
"$",
"account",
"->",
"isIncome",
"(",
")",
"||",
"$",
"account",
"->",
"isLiability",
"(",
")",
")",
"... | debit()
Debits the given account by the given account. Takes into account
what type of account it is (Asset, Liability, Income, Expense)
@author Tom Haskins-Vaughan <tom@tomhv.uk>
@since 0.8.0
@param \HarvestCloud\CoreBundle\Entity\Account $account
@param decimal $amount
@return \HarvestCloud\CoreBundle\Entity\P... | [
"debit",
"()"
] | train | https://github.com/phospr/DoubleEntryBundle/blob/d9c421f30922b461483731983c59beb26047fb7f/Model/Journal.php#L404-L418 |
Topolis/FunctionLibrary | src/Collection.php | Collection.getFromPath | public static function getFromPath($array, $path, $separator = "."){
$nodes = explode($separator, $path);
while($path && count($nodes) > 0){
$node = array_shift($nodes);
if(!is_array($array) || !isset($array[$node])){
throw new Exception(__METHOD__... | php | public static function getFromPath($array, $path, $separator = "."){
$nodes = explode($separator, $path);
while($path && count($nodes) > 0){
$node = array_shift($nodes);
if(!is_array($array) || !isset($array[$node])){
throw new Exception(__METHOD__... | [
"public",
"static",
"function",
"getFromPath",
"(",
"$",
"array",
",",
"$",
"path",
",",
"$",
"separator",
"=",
"\".\"",
")",
"{",
"$",
"nodes",
"=",
"explode",
"(",
"$",
"separator",
",",
"$",
"path",
")",
";",
"while",
"(",
"$",
"path",
"&&",
"co... | get a value from a multi dimensional tree-like array structure via a path string (ex.: "folder.folder.key")
@param array $array array to search
@param string $path path to traverse
@param string $separator (Optional) separator in path. Default: "."
@return array|mixed
@throws Exception if a node from $path is n... | [
"get",
"a",
"value",
"from",
"a",
"multi",
"dimensional",
"tree",
"-",
"like",
"array",
"structure",
"via",
"a",
"path",
"string",
"(",
"ex",
".",
":",
"folder",
".",
"folder",
".",
"key",
")"
] | train | https://github.com/Topolis/FunctionLibrary/blob/bc57f465932fbf297927c2a32765255131b907eb/src/Collection.php#L17-L31 |
Topolis/FunctionLibrary | src/Collection.php | Collection.setFromPath | public static function setFromPath(&$array, $path, $value, $separator = "."){
$nodes = explode($separator, $path);
$array = self::setFromPath_r($array, $nodes, $value);
} | php | public static function setFromPath(&$array, $path, $value, $separator = "."){
$nodes = explode($separator, $path);
$array = self::setFromPath_r($array, $nodes, $value);
} | [
"public",
"static",
"function",
"setFromPath",
"(",
"&",
"$",
"array",
",",
"$",
"path",
",",
"$",
"value",
",",
"$",
"separator",
"=",
"\".\"",
")",
"{",
"$",
"nodes",
"=",
"explode",
"(",
"$",
"separator",
",",
"$",
"path",
")",
";",
"$",
"array"... | set a value from a multi dimensional tree-like array structure via a path string (ex.: "folder.folder.key")
creating any needed array elements on the way.
@param array $array array to search
@param string $path path to traverse
@param mixed $value value to set. (if you set an array, it will be travers... | [
"set",
"a",
"value",
"from",
"a",
"multi",
"dimensional",
"tree",
"-",
"like",
"array",
"structure",
"via",
"a",
"path",
"string",
"(",
"ex",
".",
":",
"folder",
".",
"folder",
".",
"key",
")",
"creating",
"any",
"needed",
"array",
"elements",
"on",
"t... | train | https://github.com/Topolis/FunctionLibrary/blob/bc57f465932fbf297927c2a32765255131b907eb/src/Collection.php#L41-L44 |
Topolis/FunctionLibrary | src/Collection.php | Collection.addFromPath | public static function addFromPath(&$array, $path, $value, $key = null, $separator = "."){
try{
$target = self::getFromPath($array, $path, $separator);
} catch(Exception $e) {
$target = array();
}
if(!is_array($target))
throw new Exception(__METHOD_... | php | public static function addFromPath(&$array, $path, $value, $key = null, $separator = "."){
try{
$target = self::getFromPath($array, $path, $separator);
} catch(Exception $e) {
$target = array();
}
if(!is_array($target))
throw new Exception(__METHOD_... | [
"public",
"static",
"function",
"addFromPath",
"(",
"&",
"$",
"array",
",",
"$",
"path",
",",
"$",
"value",
",",
"$",
"key",
"=",
"null",
",",
"$",
"separator",
"=",
"\".\"",
")",
"{",
"try",
"{",
"$",
"target",
"=",
"self",
"::",
"getFromPath",
"(... | add a value (optionally with non-numeric key) to array at path
@param array $array array to search
@param string $path path to traverse to target array
@param mixed $value value to set. (if you set an array, it will be traversable via path too)
@param mixed $key (Optional) key to use inste... | [
"add",
"a",
"value",
"(",
"optionally",
"with",
"non",
"-",
"numeric",
"key",
")",
"to",
"array",
"at",
"path"
] | train | https://github.com/Topolis/FunctionLibrary/blob/bc57f465932fbf297927c2a32765255131b907eb/src/Collection.php#L71-L88 |
Topolis/FunctionLibrary | src/Collection.php | Collection.multisort | public static function multisort(){
$args = func_get_args();
$data = array_shift($args);
foreach ($args as $n => $field) {
if (is_string($field)) {
$tmp = array();
foreach ($data as $key => $row)
$tmp[$key] = $row[$field];
... | php | public static function multisort(){
$args = func_get_args();
$data = array_shift($args);
foreach ($args as $n => $field) {
if (is_string($field)) {
$tmp = array();
foreach ($data as $key => $row)
$tmp[$key] = $row[$field];
... | [
"public",
"static",
"function",
"multisort",
"(",
")",
"{",
"$",
"args",
"=",
"func_get_args",
"(",
")",
";",
"$",
"data",
"=",
"array_shift",
"(",
"$",
"args",
")",
";",
"foreach",
"(",
"$",
"args",
"as",
"$",
"n",
"=>",
"$",
"field",
")",
"{",
... | sort an multidimensional array by any of it's fields and return sorted array
ex.: $sorted = Utility::multisort($data, 'volume', SORT_DESC, 'edition', SORT_ASC);
IMPORTANT: This function uses mutlisort and will reindex numeric keys !
@return array
@internal param array $data array to sort
@internal param string $field n... | [
"sort",
"an",
"multidimensional",
"array",
"by",
"any",
"of",
"it",
"s",
"fields",
"and",
"return",
"sorted",
"array",
"ex",
".",
":",
"$sorted",
"=",
"Utility",
"::",
"multisort",
"(",
"$data",
"volume",
"SORT_DESC",
"edition",
"SORT_ASC",
")",
";",
"IMPO... | train | https://github.com/Topolis/FunctionLibrary/blob/bc57f465932fbf297927c2a32765255131b907eb/src/Collection.php#L121-L137 |
Topolis/FunctionLibrary | src/Collection.php | Collection.remove | public static function remove(&$array, $path, $separator = "."){
$nodes = explode($separator, $path);
$key = array_pop($nodes);
$parent = implode($separator, $nodes);
$siblings = self::getFromPath($array, $parent, $separator);
unset($siblings[$key]);
self::setFromPath($a... | php | public static function remove(&$array, $path, $separator = "."){
$nodes = explode($separator, $path);
$key = array_pop($nodes);
$parent = implode($separator, $nodes);
$siblings = self::getFromPath($array, $parent, $separator);
unset($siblings[$key]);
self::setFromPath($a... | [
"public",
"static",
"function",
"remove",
"(",
"&",
"$",
"array",
",",
"$",
"path",
",",
"$",
"separator",
"=",
"\".\"",
")",
"{",
"$",
"nodes",
"=",
"explode",
"(",
"$",
"separator",
",",
"$",
"path",
")",
";",
"$",
"key",
"=",
"array_pop",
"(",
... | delete an element from the array (or path)
@param $array
@param string $path
@param string $separator (Optional)
@return mixed | [
"delete",
"an",
"element",
"from",
"the",
"array",
"(",
"or",
"path",
")"
] | train | https://github.com/Topolis/FunctionLibrary/blob/bc57f465932fbf297927c2a32765255131b907eb/src/Collection.php#L174-L184 |
Topolis/FunctionLibrary | src/Collection.php | Collection.find | public static function find($array, $path, $search, $field = false, $default = false){
$data = self::get($array, $path, array());
foreach($data as $item)
foreach($item as $key => $value)
if( ($field == false || $field = $key) && $value == $search)
return... | php | public static function find($array, $path, $search, $field = false, $default = false){
$data = self::get($array, $path, array());
foreach($data as $item)
foreach($item as $key => $value)
if( ($field == false || $field = $key) && $value == $search)
return... | [
"public",
"static",
"function",
"find",
"(",
"$",
"array",
",",
"$",
"path",
",",
"$",
"search",
",",
"$",
"field",
"=",
"false",
",",
"$",
"default",
"=",
"false",
")",
"{",
"$",
"data",
"=",
"self",
"::",
"get",
"(",
"$",
"array",
",",
"$",
"... | search for first sub array in $array that has a matching value either in any field or in a field named $field
eg: items:
munich:
country: germany
size: 1.3M
london:
country: great britain
size: 2.9M
find($items, "germany", "country") returns the array munich
@static
@param array $array array to search in
@param s... | [
"search",
"for",
"first",
"sub",
"array",
"in",
"$array",
"that",
"has",
"a",
"matching",
"value",
"either",
"in",
"any",
"field",
"or",
"in",
"a",
"field",
"named",
"$field",
"eg",
":",
"items",
":",
"munich",
":",
"country",
":",
"germany",
"size",
"... | train | https://github.com/Topolis/FunctionLibrary/blob/bc57f465932fbf297927c2a32765255131b907eb/src/Collection.php#L233-L243 |
Topolis/FunctionLibrary | src/Collection.php | Collection.first | public static function first($array, $path, $default = false){
$data = self::get($array, $path, array());
if(count($data) > 0)
return reset($data);
return $default;
} | php | public static function first($array, $path, $default = false){
$data = self::get($array, $path, array());
if(count($data) > 0)
return reset($data);
return $default;
} | [
"public",
"static",
"function",
"first",
"(",
"$",
"array",
",",
"$",
"path",
",",
"$",
"default",
"=",
"false",
")",
"{",
"$",
"data",
"=",
"self",
"::",
"get",
"(",
"$",
"array",
",",
"$",
"path",
",",
"array",
"(",
")",
")",
";",
"if",
"(",
... | Return first element of an array at $path
@static
@param array $array
@param string $path
@param bool $default
@return bool|mixed | [
"Return",
"first",
"element",
"of",
"an",
"array",
"at",
"$path"
] | train | https://github.com/Topolis/FunctionLibrary/blob/bc57f465932fbf297927c2a32765255131b907eb/src/Collection.php#L253-L259 |
Topolis/FunctionLibrary | src/Collection.php | Collection.implodeMap | public static function implodeMap($array, $separatorAssign = ": ", $separatorElement = ", ", $encapsulation = ""){
$out = array();
foreach($array as $key => $value){
$out[] = $key.$separatorAssign.$encapsulation.$value.$encapsulation;
}
return implode($separatorElement, $out)... | php | public static function implodeMap($array, $separatorAssign = ": ", $separatorElement = ", ", $encapsulation = ""){
$out = array();
foreach($array as $key => $value){
$out[] = $key.$separatorAssign.$encapsulation.$value.$encapsulation;
}
return implode($separatorElement, $out)... | [
"public",
"static",
"function",
"implodeMap",
"(",
"$",
"array",
",",
"$",
"separatorAssign",
"=",
"\": \"",
",",
"$",
"separatorElement",
"=",
"\", \"",
",",
"$",
"encapsulation",
"=",
"\"\"",
")",
"{",
"$",
"out",
"=",
"array",
"(",
")",
";",
"foreach"... | Implode array like implode() but also display keys.
@param array $array
@param string $separatorAssign (Optional) separator between key and value. Default: ": "
@param string $separatorElement (Optional) separator between elements. Default: ", "
@param string $encapsulation (Optional) Value enc... | [
"Implode",
"array",
"like",
"implode",
"()",
"but",
"also",
"display",
"keys",
"."
] | train | https://github.com/Topolis/FunctionLibrary/blob/bc57f465932fbf297927c2a32765255131b907eb/src/Collection.php#L269-L275 |
ezra-obiwale/dSCore | src/Stdlib/Util.php | Util.camelTo_ | public static function camelTo_($str) {
if (!is_string($str))
return '';
$str[0] = strtolower($str[0]);
$func = create_function('$c', 'return "_" . strtolower($c[1]);');
return preg_replace_callback('/([A-Z])/', $func, $str);
} | php | public static function camelTo_($str) {
if (!is_string($str))
return '';
$str[0] = strtolower($str[0]);
$func = create_function('$c', 'return "_" . strtolower($c[1]);');
return preg_replace_callback('/([A-Z])/', $func, $str);
} | [
"public",
"static",
"function",
"camelTo_",
"(",
"$",
"str",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"str",
")",
")",
"return",
"''",
";",
"$",
"str",
"[",
"0",
"]",
"=",
"strtolower",
"(",
"$",
"str",
"[",
"0",
"]",
")",
";",
"$",
"... | Turns camelCasedString to under_scored_string
@param string $str
@return string | [
"Turns",
"camelCasedString",
"to",
"under_scored_string"
] | train | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Util.php#L24-L30 |
ezra-obiwale/dSCore | src/Stdlib/Util.php | Util.camelToHyphen | public static function camelToHyphen($str, $strtolower = true) {
if (!is_string($str))
return '';
$str[0] = strtolower($str[0]);
$func = create_function('$c', 'return "-" . $c[1];');
$str = preg_replace_callback('/([A-Z])/', $func, $str);
return ($strtolower) ? strtol... | php | public static function camelToHyphen($str, $strtolower = true) {
if (!is_string($str))
return '';
$str[0] = strtolower($str[0]);
$func = create_function('$c', 'return "-" . $c[1];');
$str = preg_replace_callback('/([A-Z])/', $func, $str);
return ($strtolower) ? strtol... | [
"public",
"static",
"function",
"camelToHyphen",
"(",
"$",
"str",
",",
"$",
"strtolower",
"=",
"true",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"str",
")",
")",
"return",
"''",
";",
"$",
"str",
"[",
"0",
"]",
"=",
"strtolower",
"(",
"$",
... | Turns camelCasedString to hyphened-string
@param string $str
@param boolean $strtolower
@return string | [
"Turns",
"camelCasedString",
"to",
"hyphened",
"-",
"string"
] | train | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Util.php#L38-L45 |
ezra-obiwale/dSCore | src/Stdlib/Util.php | Util.camelToSpace | public static function camelToSpace($str) {
if (!is_string($str))
return '';
$str[0] = strtolower($str[0]);
$func = create_function('$c', 'return " " . $c[1];');
return preg_replace_callback('/([A-Z])/', $func, $str);
} | php | public static function camelToSpace($str) {
if (!is_string($str))
return '';
$str[0] = strtolower($str[0]);
$func = create_function('$c', 'return " " . $c[1];');
return preg_replace_callback('/([A-Z])/', $func, $str);
} | [
"public",
"static",
"function",
"camelToSpace",
"(",
"$",
"str",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"str",
")",
")",
"return",
"''",
";",
"$",
"str",
"[",
"0",
"]",
"=",
"strtolower",
"(",
"$",
"str",
"[",
"0",
"]",
")",
";",
"$",... | Turns camelCasedString to spaced out string
@param string $str
@return string | [
"Turns",
"camelCasedString",
"to",
"spaced",
"out",
"string"
] | train | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Util.php#L63-L69 |
ezra-obiwale/dSCore | src/Stdlib/Util.php | Util.readDir | public static function readDir($dir, $return = Util::ALL, $recursive = false, $extension = NULL, $nameOnly = false, array $options = array()) {
if (!is_dir($dir))
return array(
'error' => 'Directory "' . $dir . '" does not exist',
);
if (!is_array($extension) && ... | php | public static function readDir($dir, $return = Util::ALL, $recursive = false, $extension = NULL, $nameOnly = false, array $options = array()) {
if (!is_dir($dir))
return array(
'error' => 'Directory "' . $dir . '" does not exist',
);
if (!is_array($extension) && ... | [
"public",
"static",
"function",
"readDir",
"(",
"$",
"dir",
",",
"$",
"return",
"=",
"Util",
"::",
"ALL",
",",
"$",
"recursive",
"=",
"false",
",",
"$",
"extension",
"=",
"NULL",
",",
"$",
"nameOnly",
"=",
"false",
",",
"array",
"$",
"options",
"=",
... | Reads the required source directory
@param string $dir
@param int $return
@param boolean $recursive
@param string|array\null $extension Extensions without the dot (.)
@param boolean $nameOnly Indicates whether to return full path of dirs/files or names only
@param array $options keys include:
@return array
@throws \Exc... | [
"Reads",
"the",
"required",
"source",
"directory"
] | train | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Util.php#L107-L151 |
ezra-obiwale/dSCore | src/Stdlib/Util.php | Util.copyDir | public static function copyDir($source, $destination, $permission = 0777, $recursive = true) {
if (substr($source, strlen($destination) - 1) !== DIRECTORY_SEPARATOR)
$destination .= DIRECTORY_SEPARATOR;
try {
if (!is_dir($destination))
mkdir($destination, $permis... | php | public static function copyDir($source, $destination, $permission = 0777, $recursive = true) {
if (substr($source, strlen($destination) - 1) !== DIRECTORY_SEPARATOR)
$destination .= DIRECTORY_SEPARATOR;
try {
if (!is_dir($destination))
mkdir($destination, $permis... | [
"public",
"static",
"function",
"copyDir",
"(",
"$",
"source",
",",
"$",
"destination",
",",
"$",
"permission",
"=",
"0777",
",",
"$",
"recursive",
"=",
"true",
")",
"{",
"if",
"(",
"substr",
"(",
"$",
"source",
",",
"strlen",
"(",
"$",
"destination",
... | Copies a directory to another location
@param string $source
@param string $destination
@param string $permission
@param boolean $recursive
@throws \Exception | [
"Copies",
"a",
"directory",
"to",
"another",
"location"
] | train | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Util.php#L161-L186 |
ezra-obiwale/dSCore | src/Stdlib/Util.php | Util.delDir | public static function delDir($dir) {
$all = self::readDir($dir, self::ALL, true, NULL);
if (isset($all['files'])) {
foreach ($all['files'] as $file) {
if (is_array($file)) {
foreach ($file as $fil) {
if (!unlink($fil)) {
... | php | public static function delDir($dir) {
$all = self::readDir($dir, self::ALL, true, NULL);
if (isset($all['files'])) {
foreach ($all['files'] as $file) {
if (is_array($file)) {
foreach ($file as $fil) {
if (!unlink($fil)) {
... | [
"public",
"static",
"function",
"delDir",
"(",
"$",
"dir",
")",
"{",
"$",
"all",
"=",
"self",
"::",
"readDir",
"(",
"$",
"dir",
",",
"self",
"::",
"ALL",
",",
"true",
",",
"NULL",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"all",
"[",
"'files'",
"... | Deletes a directory and all contents including subdirectories and files
@param string $file
@return boolean | [
"Deletes",
"a",
"directory",
"and",
"all",
"contents",
"including",
"subdirectories",
"and",
"files"
] | train | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Util.php#L194-L229 |
ezra-obiwale/dSCore | src/Stdlib/Util.php | Util.resizeImage | public static function resizeImage($source, $desiredWidth = 200, $destination = null, $extension = null) {
if (!$destination)
$destination = $source;
$info = pathinfo($source);
$extension = !$extension ? $info['extension'] : $extension;
/* read the source image */
sw... | php | public static function resizeImage($source, $desiredWidth = 200, $destination = null, $extension = null) {
if (!$destination)
$destination = $source;
$info = pathinfo($source);
$extension = !$extension ? $info['extension'] : $extension;
/* read the source image */
sw... | [
"public",
"static",
"function",
"resizeImage",
"(",
"$",
"source",
",",
"$",
"desiredWidth",
"=",
"200",
",",
"$",
"destination",
"=",
"null",
",",
"$",
"extension",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"destination",
")",
"$",
"destination",
"=... | Resizes an image
@param string $source Path to image file
@param int $desiredWidth The width of the new image
@param string $destination Path to save image to. If null, the source
will be overwritten
@param string $extension The extension of the source file, provided if
the source does not bear an explicit extension
@r... | [
"Resizes",
"an",
"image"
] | train | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Util.php#L241-L288 |
ezra-obiwale/dSCore | src/Stdlib/Util.php | Util.resizeImageDirectory | public static function resizeImageDirectory($dir, $desiredWidth = 200, $overwrite = false, $recursive = true, $subDir = 'resized') {
foreach (self::readDir($dir, self::FILES_ONLY, $recursive, null, true) as $path => $filesArray) {
foreach ($filesArray as $file) {
$destination = null;... | php | public static function resizeImageDirectory($dir, $desiredWidth = 200, $overwrite = false, $recursive = true, $subDir = 'resized') {
foreach (self::readDir($dir, self::FILES_ONLY, $recursive, null, true) as $path => $filesArray) {
foreach ($filesArray as $file) {
$destination = null;... | [
"public",
"static",
"function",
"resizeImageDirectory",
"(",
"$",
"dir",
",",
"$",
"desiredWidth",
"=",
"200",
",",
"$",
"overwrite",
"=",
"false",
",",
"$",
"recursive",
"=",
"true",
",",
"$",
"subDir",
"=",
"'resized'",
")",
"{",
"foreach",
"(",
"self"... | Resize all images in a directory
@param string $dir Directory path of images
@param int $desiredWidth Desired width of new images
@param boolean $overwrite Overwrite old images?
@param boolean $recursive Indicates if subdirectories should be searched too
@param string $subDir If not overwrite, name of subfolder within... | [
"Resize",
"all",
"images",
"in",
"a",
"directory"
] | train | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Util.php#L300-L313 |
ezra-obiwale/dSCore | src/Stdlib/Util.php | Util.shortenString | public static function shortenString($str, $length = 75, $break = '...') {
if (strlen($str) < $length)
return $str;
$str = strip_tags($str);
return substr($str, 0, $length) . $break;
} | php | public static function shortenString($str, $length = 75, $break = '...') {
if (strlen($str) < $length)
return $str;
$str = strip_tags($str);
return substr($str, 0, $length) . $break;
} | [
"public",
"static",
"function",
"shortenString",
"(",
"$",
"str",
",",
"$",
"length",
"=",
"75",
",",
"$",
"break",
"=",
"'...'",
")",
"{",
"if",
"(",
"strlen",
"(",
"$",
"str",
")",
"<",
"$",
"length",
")",
"return",
"$",
"str",
";",
"$",
"str",... | Shortens a string to desired length
@param string $str String to shorten
@param integer $length Length of the string to return
@param string $break String to replace the truncated part with
@return string | [
"Shortens",
"a",
"string",
"to",
"desired",
"length"
] | train | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Util.php#L322-L329 |
ezra-obiwale/dSCore | src/Stdlib/Util.php | Util.uploadFiles | public static function uploadFiles(\Object $data, array $options = array()) {
$return = array('success' => array(), 'errors' => array());
foreach ($data->toArray(TRUE) as $ppt => $info) {
if (is_array($options['ignore']) && in_array($ppt, $options['ignore']))
continue;
... | php | public static function uploadFiles(\Object $data, array $options = array()) {
$return = array('success' => array(), 'errors' => array());
foreach ($data->toArray(TRUE) as $ppt => $info) {
if (is_array($options['ignore']) && in_array($ppt, $options['ignore']))
continue;
... | [
"public",
"static",
"function",
"uploadFiles",
"(",
"\\",
"Object",
"$",
"data",
",",
"array",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"return",
"=",
"array",
"(",
"'success'",
"=>",
"array",
"(",
")",
",",
"'errors'",
"=>",
"array",
"... | Uploads file(s) to the server
@param \Object $data Files to upload
@param array $options Keys include [(string) path, (int) maxSize,
(array) extensions - in lower case, (array) ignore, (string) prefix]
@return boolean|string | [
"Uploads",
"file",
"(",
"s",
")",
"to",
"the",
"server"
] | train | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Util.php#L351-L394 |
ezra-obiwale/dSCore | src/Stdlib/Util.php | Util.randomPassword | public static function randomPassword($length = 8, $string = null) {
if (!$string)
$string = 'bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ123456789&^%$#@!_-+=';
$chars = str_split(str_shuffle($string));
$password = '';
foreach (array_rand($chars, $length) as $key) {
... | php | public static function randomPassword($length = 8, $string = null) {
if (!$string)
$string = 'bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ123456789&^%$#@!_-+=';
$chars = str_split(str_shuffle($string));
$password = '';
foreach (array_rand($chars, $length) as $key) {
... | [
"public",
"static",
"function",
"randomPassword",
"(",
"$",
"length",
"=",
"8",
",",
"$",
"string",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"string",
")",
"$",
"string",
"=",
"'bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ123456789&^%$#@!_-+='",
";",
"$",
"ch... | Generates a random password
@param int $length Length of the password to generate. Default is 8
@return string | [
"Generates",
"a",
"random",
"password"
] | train | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Util.php#L401-L410 |
ezra-obiwale/dSCore | src/Stdlib/Util.php | Util.listTimezones | public static function listTimezones() {
if (self::$timezones === null) {
self::$timezones = array();
$offsets = array();
$now = new DateTime();
foreach (DateTimeZone::listIdentifiers() as $timezone) {
$now->setTimezone(new DateTimeZone($timezone)... | php | public static function listTimezones() {
if (self::$timezones === null) {
self::$timezones = array();
$offsets = array();
$now = new DateTime();
foreach (DateTimeZone::listIdentifiers() as $timezone) {
$now->setTimezone(new DateTimeZone($timezone)... | [
"public",
"static",
"function",
"listTimezones",
"(",
")",
"{",
"if",
"(",
"self",
"::",
"$",
"timezones",
"===",
"null",
")",
"{",
"self",
"::",
"$",
"timezones",
"=",
"array",
"(",
")",
";",
"$",
"offsets",
"=",
"array",
"(",
")",
";",
"$",
"now"... | Create a list of time zones
@return array | [
"Create",
"a",
"list",
"of",
"time",
"zones"
] | train | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Util.php#L448-L464 |
ezra-obiwale/dSCore | src/Stdlib/Util.php | Util.formatGmtOffset | public static function formatGmtOffset($offset) {
$hours = intval($offset / 3600);
$minutes = abs(intval($offset % 3600 / 60));
return 'GMT' . ($offset ? sprintf('%+03d:%02d', $hours, $minutes) : '');
} | php | public static function formatGmtOffset($offset) {
$hours = intval($offset / 3600);
$minutes = abs(intval($offset % 3600 / 60));
return 'GMT' . ($offset ? sprintf('%+03d:%02d', $hours, $minutes) : '');
} | [
"public",
"static",
"function",
"formatGmtOffset",
"(",
"$",
"offset",
")",
"{",
"$",
"hours",
"=",
"intval",
"(",
"$",
"offset",
"/",
"3600",
")",
";",
"$",
"minutes",
"=",
"abs",
"(",
"intval",
"(",
"$",
"offset",
"%",
"3600",
"/",
"60",
")",
")"... | Formats GMT offset to string
@param string $offset
@return string | [
"Formats",
"GMT",
"offset",
"to",
"string"
] | train | https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Util.php#L471-L475 |
swaros/golib | src/Types/Props.php | Props.applyData | public function applyData ( $data = NULL ) {
if (NULL != $data && is_array( $data )) {
foreach ($data as $propName => $propValue) {
$this->assignValue( $propName, $propValue );
}
} else {
$this->buildVars();
}
} | php | public function applyData ( $data = NULL ) {
if (NULL != $data && is_array( $data )) {
foreach ($data as $propName => $propValue) {
$this->assignValue( $propName, $propValue );
}
} else {
$this->buildVars();
}
} | [
"public",
"function",
"applyData",
"(",
"$",
"data",
"=",
"NULL",
")",
"{",
"if",
"(",
"NULL",
"!=",
"$",
"data",
"&&",
"is_array",
"(",
"$",
"data",
")",
")",
"{",
"foreach",
"(",
"$",
"data",
"as",
"$",
"propName",
"=>",
"$",
"propValue",
")",
... | apply given data to properties
@param array $data | [
"apply",
"given",
"data",
"to",
"properties"
] | train | https://github.com/swaros/golib/blob/9e75c8fb36de7c09b01a6c1c0d27c45f02fed567/src/Types/Props.php#L36-L44 |
swaros/golib | src/Types/Props.php | Props.assignExisting | public function assignExisting ( $propName, $propValue ) {
if (is_bool( $this->$propName )) {
if (strtolower( $propValue ) == 'false') {
$propValue = false;
}
$this->$propName = (bool) $propValue;
} elseif (is_int( $this->$propName )) {
$th... | php | public function assignExisting ( $propName, $propValue ) {
if (is_bool( $this->$propName )) {
if (strtolower( $propValue ) == 'false') {
$propValue = false;
}
$this->$propName = (bool) $propValue;
} elseif (is_int( $this->$propName )) {
$th... | [
"public",
"function",
"assignExisting",
"(",
"$",
"propName",
",",
"$",
"propValue",
")",
"{",
"if",
"(",
"is_bool",
"(",
"$",
"this",
"->",
"$",
"propName",
")",
")",
"{",
"if",
"(",
"strtolower",
"(",
"$",
"propValue",
")",
"==",
"'false'",
")",
"{... | assign value to a existing propertie and
cast depending on defined default value
@param string $propName
@param boolean $propValue | [
"assign",
"value",
"to",
"a",
"existing",
"propertie",
"and",
"cast",
"depending",
"on",
"defined",
"default",
"value"
] | train | https://github.com/swaros/golib/blob/9e75c8fb36de7c09b01a6c1c0d27c45f02fed567/src/Types/Props.php#L61-L76 |
swaros/golib | src/Types/Props.php | Props.assignValue | public function assignValue ( $propNameOrig, $propValue ) {
$propNameA = str_replace( self::$replaceChars, '_', $propNameOrig );
$propName = preg_replace( "/[^A-Za-z0-9_]/", "", $propNameA );
if (property_exists( $this, $propName ) && $this->$propName !== NULL) {
$this->assignExistin... | php | public function assignValue ( $propNameOrig, $propValue ) {
$propNameA = str_replace( self::$replaceChars, '_', $propNameOrig );
$propName = preg_replace( "/[^A-Za-z0-9_]/", "", $propNameA );
if (property_exists( $this, $propName ) && $this->$propName !== NULL) {
$this->assignExistin... | [
"public",
"function",
"assignValue",
"(",
"$",
"propNameOrig",
",",
"$",
"propValue",
")",
"{",
"$",
"propNameA",
"=",
"str_replace",
"(",
"self",
"::",
"$",
"replaceChars",
",",
"'_'",
",",
"$",
"propNameOrig",
")",
";",
"$",
"propName",
"=",
"preg_replac... | main assign value method.
@param string $propNameOrig
@param mixed $propValue | [
"main",
"assign",
"value",
"method",
"."
] | train | https://github.com/swaros/golib/blob/9e75c8fb36de7c09b01a6c1c0d27c45f02fed567/src/Types/Props.php#L84-L92 |
libreworks/caridea-auth | src/Service.php | Service.getPrincipal | public function getPrincipal(): Principal
{
if ($this->principal === null && !$this->resume()) {
$this->principal = Principal::getAnonymous();
}
return $this->principal;
} | php | public function getPrincipal(): Principal
{
if ($this->principal === null && !$this->resume()) {
$this->principal = Principal::getAnonymous();
}
return $this->principal;
} | [
"public",
"function",
"getPrincipal",
"(",
")",
":",
"Principal",
"{",
"if",
"(",
"$",
"this",
"->",
"principal",
"===",
"null",
"&&",
"!",
"$",
"this",
"->",
"resume",
"(",
")",
")",
"{",
"$",
"this",
"->",
"principal",
"=",
"Principal",
"::",
"getA... | Gets the currently authenticated principal.
If no one is authenticated, this will return an anonymous Principal. If
The session is not started but can be resumed, it will be resumed and the
principal will be loaded.
@return Principal the authenticated principal | [
"Gets",
"the",
"currently",
"authenticated",
"principal",
"."
] | train | https://github.com/libreworks/caridea-auth/blob/1bf965c57716942b18ca3204629f6bda99cf876a/src/Service.php#L81-L87 |
libreworks/caridea-auth | src/Service.php | Service.login | public function login(ServerRequestInterface $request, ?Adapter $adapter = null): bool
{
$started = $this->session->resume() || $this->session->start();
if (!$started) {
return false;
}
$login = $adapter ?? $this->adapter;
if ($login === null) {
throw... | php | public function login(ServerRequestInterface $request, ?Adapter $adapter = null): bool
{
$started = $this->session->resume() || $this->session->start();
if (!$started) {
return false;
}
$login = $adapter ?? $this->adapter;
if ($login === null) {
throw... | [
"public",
"function",
"login",
"(",
"ServerRequestInterface",
"$",
"request",
",",
"?",
"Adapter",
"$",
"adapter",
"=",
"null",
")",
":",
"bool",
"{",
"$",
"started",
"=",
"$",
"this",
"->",
"session",
"->",
"resume",
"(",
")",
"||",
"$",
"this",
"->",... | Authenticates a principal.
@param ServerRequestInterface $request The Server Request message containing credentials
@param Adapter|null $adapter An optional adapter to use.
Will use the default authentication adapter if none is specified.
@return bool Whether the session could be established
@throws \InvalidArgumentEx... | [
"Authenticates",
"a",
"principal",
"."
] | train | https://github.com/libreworks/caridea-auth/blob/1bf965c57716942b18ca3204629f6bda99cf876a/src/Service.php#L103-L129 |
libreworks/caridea-auth | src/Service.php | Service.publishLogin | protected function publishLogin(Principal $principal): bool
{
$this->publisher->publish(new Event\Login($this, $principal));
return true;
} | php | protected function publishLogin(Principal $principal): bool
{
$this->publisher->publish(new Event\Login($this, $principal));
return true;
} | [
"protected",
"function",
"publishLogin",
"(",
"Principal",
"$",
"principal",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"publisher",
"->",
"publish",
"(",
"new",
"Event",
"\\",
"Login",
"(",
"$",
"this",
",",
"$",
"principal",
")",
")",
";",
"return",
"... | Publishes the login event.
@param \Caridea\Auth\Principal $principal The authenticated principal
@return bool Always true | [
"Publishes",
"the",
"login",
"event",
"."
] | train | https://github.com/libreworks/caridea-auth/blob/1bf965c57716942b18ca3204629f6bda99cf876a/src/Service.php#L137-L141 |
libreworks/caridea-auth | src/Service.php | Service.resume | public function resume(): bool
{
if ($this->values->offsetExists('principal')) {
$this->principal = $this->values->get('principal');
$this->logger->info(
"Authentication resume: {user}",
['user' => $this->principal]
);
$this->p... | php | public function resume(): bool
{
if ($this->values->offsetExists('principal')) {
$this->principal = $this->values->get('principal');
$this->logger->info(
"Authentication resume: {user}",
['user' => $this->principal]
);
$this->p... | [
"public",
"function",
"resume",
"(",
")",
":",
"bool",
"{",
"if",
"(",
"$",
"this",
"->",
"values",
"->",
"offsetExists",
"(",
"'principal'",
")",
")",
"{",
"$",
"this",
"->",
"principal",
"=",
"$",
"this",
"->",
"values",
"->",
"get",
"(",
"'princip... | Resumes an existing authenticated session.
@return bool If an authentication session existed | [
"Resumes",
"an",
"existing",
"authenticated",
"session",
"."
] | train | https://github.com/libreworks/caridea-auth/blob/1bf965c57716942b18ca3204629f6bda99cf876a/src/Service.php#L148-L164 |
libreworks/caridea-auth | src/Service.php | Service.publishResume | protected function publishResume(Principal $principal, Map $values)
{
$this->publisher->publish(new Event\Resume(
$this,
$principal,
$values->get('firstActive') ?? 0.0,
$values->get('lastActive') ?? 0.0
));
} | php | protected function publishResume(Principal $principal, Map $values)
{
$this->publisher->publish(new Event\Resume(
$this,
$principal,
$values->get('firstActive') ?? 0.0,
$values->get('lastActive') ?? 0.0
));
} | [
"protected",
"function",
"publishResume",
"(",
"Principal",
"$",
"principal",
",",
"Map",
"$",
"values",
")",
"{",
"$",
"this",
"->",
"publisher",
"->",
"publish",
"(",
"new",
"Event",
"\\",
"Resume",
"(",
"$",
"this",
",",
"$",
"principal",
",",
"$",
... | Publishes the resume event.
@param \Caridea\Auth\Principal $principal The authenticated principal
@param \Caridea\Session\Map $values The session values | [
"Publishes",
"the",
"resume",
"event",
"."
] | train | https://github.com/libreworks/caridea-auth/blob/1bf965c57716942b18ca3204629f6bda99cf876a/src/Service.php#L172-L180 |
libreworks/caridea-auth | src/Service.php | Service.logout | public function logout(): bool
{
if ($this->values->offsetExists('principal')) {
$principal = $this->getPrincipal();
$this->principal = Principal::getAnonymous();
$this->session->destroy();
$this->logger->info(
"Authentication logout: {user}"... | php | public function logout(): bool
{
if ($this->values->offsetExists('principal')) {
$principal = $this->getPrincipal();
$this->principal = Principal::getAnonymous();
$this->session->destroy();
$this->logger->info(
"Authentication logout: {user}"... | [
"public",
"function",
"logout",
"(",
")",
":",
"bool",
"{",
"if",
"(",
"$",
"this",
"->",
"values",
"->",
"offsetExists",
"(",
"'principal'",
")",
")",
"{",
"$",
"principal",
"=",
"$",
"this",
"->",
"getPrincipal",
"(",
")",
";",
"$",
"this",
"->",
... | Logs out the currently authenticated principal.
@return bool If a principal existed in the session to log out | [
"Logs",
"out",
"the",
"currently",
"authenticated",
"principal",
"."
] | train | https://github.com/libreworks/caridea-auth/blob/1bf965c57716942b18ca3204629f6bda99cf876a/src/Service.php#L187-L202 |
libreworks/caridea-auth | src/Service.php | Service.publishLogout | protected function publishLogout(Principal $principal): bool
{
$this->publisher->publish(new Event\Logout($this, $principal));
return true;
} | php | protected function publishLogout(Principal $principal): bool
{
$this->publisher->publish(new Event\Logout($this, $principal));
return true;
} | [
"protected",
"function",
"publishLogout",
"(",
"Principal",
"$",
"principal",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"publisher",
"->",
"publish",
"(",
"new",
"Event",
"\\",
"Logout",
"(",
"$",
"this",
",",
"$",
"principal",
")",
")",
";",
"return",
... | Publishes the logout event.
@param \Caridea\Auth\Principal $principal The authenticated principal
@return bool Always true | [
"Publishes",
"the",
"logout",
"event",
"."
] | train | https://github.com/libreworks/caridea-auth/blob/1bf965c57716942b18ca3204629f6bda99cf876a/src/Service.php#L210-L214 |
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",
"."
] | train | https://github.com/CrunchPHP/fastcgi/blob/102437193e67e5a841ec5a897549ec345788d1bd/src/Protocol/Role.php#L46-L63 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.hasFields | protected function hasFields(/*variable arguments*/)
{
$missingFields = array();
$args = func_get_args();
foreach ($args as $field) {
if (!isset($this->config[$field])) {
$missingFields[] = $field;
}
}
if (count($missingFields) > 0) {
... | php | protected function hasFields(/*variable arguments*/)
{
$missingFields = array();
$args = func_get_args();
foreach ($args as $field) {
if (!isset($this->config[$field])) {
$missingFields[] = $field;
}
}
if (count($missingFields) > 0) {
... | [
"protected",
"function",
"hasFields",
"(",
"/*variable arguments*/",
")",
"{",
"$",
"missingFields",
"=",
"array",
"(",
")",
";",
"$",
"args",
"=",
"func_get_args",
"(",
")",
";",
"foreach",
"(",
"$",
"args",
"as",
"$",
"field",
")",
"{",
"if",
"(",
"!... | Checks if the config has fields described in argument.<br>
Missing field(s) is in the exception message.
To check that the config has eid and secret:<br>
<code>
try {
$this->hasFields('eid', 'secret');
}
catch(Exception $e) {
echo "Missing fields: " . $e->getMessage();
}
</code>
@throws Exception
@return void | [
"Checks",
"if",
"the",
"config",
"has",
"fields",
"described",
"in",
"argument",
".",
"<br",
">",
"Missing",
"field",
"(",
"s",
")",
"is",
"in",
"the",
"exception",
"message",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L412-L426 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.init | protected function init()
{
$this->hasFields('eid', 'secret', 'mode', 'pcStorage', 'pcURI');
if (!is_int($this->config['eid'])) {
$this->config['eid'] = intval($this->config['eid']);
}
if ($this->config['eid'] <= 0) {
throw new Klarna_ConfigFieldMissingExcep... | php | protected function init()
{
$this->hasFields('eid', 'secret', 'mode', 'pcStorage', 'pcURI');
if (!is_int($this->config['eid'])) {
$this->config['eid'] = intval($this->config['eid']);
}
if ($this->config['eid'] <= 0) {
throw new Klarna_ConfigFieldMissingExcep... | [
"protected",
"function",
"init",
"(",
")",
"{",
"$",
"this",
"->",
"hasFields",
"(",
"'eid'",
",",
"'secret'",
",",
"'mode'",
",",
"'pcStorage'",
",",
"'pcURI'",
")",
";",
"if",
"(",
"!",
"is_int",
"(",
"$",
"this",
"->",
"config",
"[",
"'eid'",
"]",... | Initializes the Klarna object accordingly to the set config object.
@throws KlarnaException
@return void | [
"Initializes",
"the",
"Klarna",
"object",
"accordingly",
"to",
"the",
"set",
"config",
"object",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L434-L544 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L580-L607 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L618-L624 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.getLocale | public function getLocale(
$country = null, $language = null, $currency = null
) {
$locale = array(
'country' => null,
'language' => null,
'currency' => null
);
if ($country === null) {
// Use the configured country / language / curren... | php | public function getLocale(
$country = null, $language = null, $currency = null
) {
$locale = array(
'country' => null,
'language' => null,
'currency' => null
);
if ($country === null) {
// Use the configured country / language / curren... | [
"public",
"function",
"getLocale",
"(",
"$",
"country",
"=",
"null",
",",
"$",
"language",
"=",
"null",
",",
"$",
"currency",
"=",
"null",
")",
"{",
"$",
"locale",
"=",
"array",
"(",
"'country'",
"=>",
"null",
",",
"'language'",
"=>",
"null",
",",
"'... | Get the complete locale (country, language, currency) to use for the
values passed, or the configured value if passing null.
@param mixed $country country constant or code
@param mixed $language language constant or code
@param mixed $currency currency constant or code
@throws KlarnaException
@return array | [
"Get",
"the",
"complete",
"locale",
"(",
"country",
"language",
"currency",
")",
"to",
"use",
"for",
"the",
"values",
"passed",
"or",
"the",
"configured",
"value",
"if",
"passing",
"null",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L637-L696 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L712-L721 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L730-L738 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.getCountryForCode | public static function getCountryForCode($code)
{
$country = KlarnaCountry::fromCode($code);
if ($country === null) {
throw new Klarna_UnknownCountryException($code);
}
return $country;
} | php | public static function getCountryForCode($code)
{
$country = KlarnaCountry::fromCode($code);
if ($country === null) {
throw new Klarna_UnknownCountryException($code);
}
return $country;
} | [
"public",
"static",
"function",
"getCountryForCode",
"(",
"$",
"code",
")",
"{",
"$",
"country",
"=",
"KlarnaCountry",
"::",
"fromCode",
"(",
"$",
"code",
")",
";",
"if",
"(",
"$",
"country",
"===",
"null",
")",
"{",
"throw",
"new",
"Klarna_UnknownCountryE... | Returns the {@link KlarnaCountry country} constant from the country code.
@param string $code Two letter code, e.g. "se", "no", etc.
@throws KlarnaException
@return int {@link KlarnaCountry Country} constant. | [
"Returns",
"the",
"{",
"@link",
"KlarnaCountry",
"country",
"}",
"constant",
"from",
"the",
"country",
"code",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L748-L755 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L781-L789 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L798-L806 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.getLanguageForCode | public static function getLanguageForCode($code)
{
$language = KlarnaLanguage::fromCode($code);
if ($language === null) {
throw new Klarna_UnknownLanguageException($code);
}
return $language;
} | php | public static function getLanguageForCode($code)
{
$language = KlarnaLanguage::fromCode($code);
if ($language === null) {
throw new Klarna_UnknownLanguageException($code);
}
return $language;
} | [
"public",
"static",
"function",
"getLanguageForCode",
"(",
"$",
"code",
")",
"{",
"$",
"language",
"=",
"KlarnaLanguage",
"::",
"fromCode",
"(",
"$",
"code",
")",
";",
"if",
"(",
"$",
"language",
"===",
"null",
")",
"{",
"throw",
"new",
"Klarna_UnknownLang... | Returns the {@link KlarnaLanguage language} constant from the language code.
@param string $code Two letter code, e.g. "da", "de", etc.
@throws KlarnaException
@return int {@link KlarnaLanguage Language} constant. | [
"Returns",
"the",
"{",
"@link",
"KlarnaLanguage",
"language",
"}",
"constant",
"from",
"the",
"language",
"code",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L816-L824 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L850-L858 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.getCurrencyForCode | public static function getCurrencyForCode($code)
{
$currency = KlarnaCurrency::fromCode($code);
if ($currency === null) {
throw new Klarna_UnknownCurrencyException($code);
}
return $currency;
} | php | public static function getCurrencyForCode($code)
{
$currency = KlarnaCurrency::fromCode($code);
if ($currency === null) {
throw new Klarna_UnknownCurrencyException($code);
}
return $currency;
} | [
"public",
"static",
"function",
"getCurrencyForCode",
"(",
"$",
"code",
")",
"{",
"$",
"currency",
"=",
"KlarnaCurrency",
"::",
"fromCode",
"(",
"$",
"code",
")",
";",
"if",
"(",
"$",
"currency",
"===",
"null",
")",
"{",
"throw",
"new",
"Klarna_UnknownCurr... | Returns the {@link KlarnaCurrency currency} constant from the currency
code.
@param string $code Two letter code, e.g. "dkk", "eur", etc.
@throws KlarnaException
@return int {@link KlarnaCurrency Currency} constant. | [
"Returns",
"the",
"{",
"@link",
"KlarnaCurrency",
"currency",
"}",
"constant",
"from",
"the",
"currency",
"code",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L869-L876 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L885-L893 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.getLanguageForCountry | public function getLanguageForCountry($country = null)
{
if ($country === null) {
$country = $this->_country;
}
// Since getLanguage defaults to EN, check so we actually have a match
$language = KlarnaCountry::getLanguage($country);
if (KlarnaCountry::checkLanguag... | php | public function getLanguageForCountry($country = null)
{
if ($country === null) {
$country = $this->_country;
}
// Since getLanguage defaults to EN, check so we actually have a match
$language = KlarnaCountry::getLanguage($country);
if (KlarnaCountry::checkLanguag... | [
"public",
"function",
"getLanguageForCountry",
"(",
"$",
"country",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"country",
"===",
"null",
")",
"{",
"$",
"country",
"=",
"$",
"this",
"->",
"_country",
";",
"}",
"// Since getLanguage defaults to EN, check so we actuall... | Returns the {@link KlarnaLanguage language} constant for the specified
or set country.
@param int $country {@link KlarnaCountry Country} constant.
@deprecated Do not use.
@return int|false if no match otherwise KlarnaLanguage constant. | [
"Returns",
"the",
"{",
"@link",
"KlarnaLanguage",
"language",
"}",
"constant",
"for",
"the",
"specified",
"or",
"set",
"country",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L915-L926 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.getCurrencyForCountry | public function getCurrencyForCountry($country = null)
{
if ($country === null) {
$country = $this->_country;
}
return KlarnaCountry::getCurrency($country);
} | php | public function getCurrencyForCountry($country = null)
{
if ($country === null) {
$country = $this->_country;
}
return KlarnaCountry::getCurrency($country);
} | [
"public",
"function",
"getCurrencyForCountry",
"(",
"$",
"country",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"country",
"===",
"null",
")",
"{",
"$",
"country",
"=",
"$",
"this",
"->",
"_country",
";",
"}",
"return",
"KlarnaCountry",
"::",
"getCurrency",
"... | Returns the {@link KlarnaCurrency currency} constant for the specified
or set country.
@param int $country {@link KlarnaCountry country} constant.
@deprecated Do not use.
@return int|false {@link KlarnaCurrency currency} constant. | [
"Returns",
"the",
"{",
"@link",
"KlarnaCurrency",
"currency",
"}",
"constant",
"for",
"the",
"specified",
"or",
"set",
"country",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L938-L944 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L964-L970 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.setShipmentInfo | public function setShipmentInfo($name, $value)
{
$this->_checkArgument($name, "name");
$this->shipInfo[$name] = $value;
} | php | public function setShipmentInfo($name, $value)
{
$this->_checkArgument($name, "name");
$this->shipInfo[$name] = $value;
} | [
"public",
"function",
"setShipmentInfo",
"(",
"$",
"name",
",",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"_checkArgument",
"(",
"$",
"name",
",",
"\"name\"",
")",
";",
"$",
"this",
"->",
"shipInfo",
"[",
"$",
"name",
"]",
"=",
"$",
"value",
";",
... | Sets the shipment information for the upcoming transaction.<br>
Using this method is optional.
<b>Available named values are</b>:<br>
int - delay_adjust<br>
string - shipping_company<br>
string - shipping_product<br>
string - tracking_no<br>
array - warehouse_addr<br>
"warehouse_addr" is sent using {@link Klarna... | [
"Sets",
"the",
"shipment",
"information",
"for",
"the",
"upcoming",
"transaction",
".",
"<br",
">"
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L995-L1000 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.setExtraInfo | public function setExtraInfo($name, $value)
{
$this->_checkArgument($name, "name");
$this->extraInfo[$name] = $value;
} | php | public function setExtraInfo($name, $value)
{
$this->_checkArgument($name, "name");
$this->extraInfo[$name] = $value;
} | [
"public",
"function",
"setExtraInfo",
"(",
"$",
"name",
",",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"_checkArgument",
"(",
"$",
"name",
",",
"\"name\"",
")",
";",
"$",
"this",
"->",
"extraInfo",
"[",
"$",
"name",
"]",
"=",
"$",
"value",
";",
"}... | Sets the extra information for the upcoming transaction.<br>
Using this method is optional.
<b>Available named values are</b>:<br>
string - cust_no<br>
string - estore_user<br>
string - ready_date<br>
string - rand_string<br>
int - bclass<br>
string - pin<br>
Make sure you send in the values as the right data typ... | [
"Sets",
"the",
"extra",
"information",
"for",
"the",
"upcoming",
"transaction",
".",
"<br",
">"
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1054-L1059 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.setIncomeInfo | public function setIncomeInfo($name, $value)
{
$this->_checkArgument($name, "name");
$this->incomeInfo[$name] = $value;
} | php | public function setIncomeInfo($name, $value)
{
$this->_checkArgument($name, "name");
$this->incomeInfo[$name] = $value;
} | [
"public",
"function",
"setIncomeInfo",
"(",
"$",
"name",
",",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"_checkArgument",
"(",
"$",
"name",
",",
"\"name\"",
")",
";",
"$",
"this",
"->",
"incomeInfo",
"[",
"$",
"name",
"]",
"=",
"$",
"value",
";",
... | Sets the income expense information for the upcoming transaction.<br>
Using this method is optional.
Make sure you send in the values as the right data type.<br>
Use strval, intval or similar methods to ensure the right type is sent.
@param string $name key
@param mixed $value value
@throws KlarnaException
@retur... | [
"Sets",
"the",
"income",
"expense",
"information",
"for",
"the",
"upcoming",
"transaction",
".",
"<br",
">"
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1075-L1080 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.setBankInfo | public function setBankInfo($name, $value)
{
$this->_checkArgument($name, "name");
$this->bankInfo[$name] = $value;
} | php | public function setBankInfo($name, $value)
{
$this->_checkArgument($name, "name");
$this->bankInfo[$name] = $value;
} | [
"public",
"function",
"setBankInfo",
"(",
"$",
"name",
",",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"_checkArgument",
"(",
"$",
"name",
",",
"\"name\"",
")",
";",
"$",
"this",
"->",
"bankInfo",
"[",
"$",
"name",
"]",
"=",
"$",
"value",
";",
"}"
... | Sets the bank information for the upcoming transaction.<br>
Using this method is optional.
Make sure you send in the values as the right data type.<br>
Use strval, intval or similar methods to ensure the right type is sent.
@param string $name key
@param mixed $value value
@throws KlarnaException
@return void | [
"Sets",
"the",
"bank",
"information",
"for",
"the",
"upcoming",
"transaction",
".",
"<br",
">"
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1096-L1101 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.setTravelInfo | public function setTravelInfo($name, $value)
{
$this->_checkArgument($name, "name");
$this->travelInfo[$name] = $value;
} | php | public function setTravelInfo($name, $value)
{
$this->_checkArgument($name, "name");
$this->travelInfo[$name] = $value;
} | [
"public",
"function",
"setTravelInfo",
"(",
"$",
"name",
",",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"_checkArgument",
"(",
"$",
"name",
",",
"\"name\"",
")",
";",
"$",
"this",
"->",
"travelInfo",
"[",
"$",
"name",
"]",
"=",
"$",
"value",
";",
... | Sets the travel information for the upcoming transaction.<br>
Using this method is optional.
Make sure you send in the values as the right data type.<br>
Use strval, intval or similar methods to ensure the right type is sent.
@param string $name key
@param mixed $value value
@throws KlarnaException
@return void | [
"Sets",
"the",
"travel",
"information",
"for",
"the",
"upcoming",
"transaction",
".",
"<br",
">"
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1117-L1122 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1141-L1165 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1180-L1202 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.setEstoreInfo | public function setEstoreInfo($orderid1 = "", $orderid2 = "", $user = "")
{
if (!is_string($orderid1)) {
$orderid1 = strval($orderid1);
}
if (!is_string($orderid2)) {
$orderid2 = strval($orderid2);
}
if (!is_string($user)) {
$user = strva... | php | public function setEstoreInfo($orderid1 = "", $orderid2 = "", $user = "")
{
if (!is_string($orderid1)) {
$orderid1 = strval($orderid1);
}
if (!is_string($orderid2)) {
$orderid2 = strval($orderid2);
}
if (!is_string($user)) {
$user = strva... | [
"public",
"function",
"setEstoreInfo",
"(",
"$",
"orderid1",
"=",
"\"\"",
",",
"$",
"orderid2",
"=",
"\"\"",
",",
"$",
"user",
"=",
"\"\"",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"orderid1",
")",
")",
"{",
"$",
"orderid1",
"=",
"strval",
... | Sets order id's from other systems for the upcoming transaction.<br>
User is only sent with {@link Klarna::addTransaction()}.<br>
@param string $orderid1 order id 1
@param string $orderid2 order id 2
@param string $user username
@see Klarna::setExtraInfo()
@throws KlarnaException
@return void | [
"Sets",
"order",
"id",
"s",
"from",
"other",
"systems",
"for",
"the",
"upcoming",
"transaction",
".",
"<br",
">",
"User",
"is",
"only",
"sent",
"with",
"{",
"@link",
"Klarna",
"::",
"addTransaction",
"()",
"}",
".",
"<br",
">"
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1217-L1237 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.setReference | public function setReference($ref, $code)
{
$this->_checkRef($ref, $code);
$this->reference = $ref;
$this->reference_code = $code;
} | php | public function setReference($ref, $code)
{
$this->_checkRef($ref, $code);
$this->reference = $ref;
$this->reference_code = $code;
} | [
"public",
"function",
"setReference",
"(",
"$",
"ref",
",",
"$",
"code",
")",
"{",
"$",
"this",
"->",
"_checkRef",
"(",
"$",
"ref",
",",
"$",
"code",
")",
";",
"$",
"this",
"->",
"reference",
"=",
"$",
"ref",
";",
"$",
"this",
"->",
"reference_code... | Sets the reference (person) and reference code, for the upcoming
transaction.
If this is omitted, it can grab first name, last name from the address
and use that as a reference person.
@param string $ref Reference person / message to customer on invoice.
@param string $code Reference code / message to customer on in... | [
"Sets",
"the",
"reference",
"(",
"person",
")",
"and",
"reference",
"code",
"for",
"the",
"upcoming",
"transaction",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1251-L1256 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.getPNOEncoding | public function getPNOEncoding()
{
$this->_checkLocale();
$country = KlarnaCountry::getCode($this->_country);
return KlarnaEncoding::get($country);
} | php | public function getPNOEncoding()
{
$this->_checkLocale();
$country = KlarnaCountry::getCode($this->_country);
return KlarnaEncoding::get($country);
} | [
"public",
"function",
"getPNOEncoding",
"(",
")",
"{",
"$",
"this",
"->",
"_checkLocale",
"(",
")",
";",
"$",
"country",
"=",
"KlarnaCountry",
"::",
"getCode",
"(",
"$",
"this",
"->",
"_country",
")",
";",
"return",
"KlarnaEncoding",
"::",
"get",
"(",
"$... | Returns the PNO/SSN encoding constant for currently set country.
<b>Note</b>:<br>
Country, language and currency needs to match!
@throws KlarnaException
@return int {@link KlarnaEncoding} constant. | [
"Returns",
"the",
"PNO",
"/",
"SSN",
"encoding",
"constant",
"for",
"currently",
"set",
"country",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1321-L1328 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.getAddresses | public function getAddresses(
$pno, $encoding = null, $type = KlarnaFlags::GA_GIVEN
) {
if ($this->_country !== KlarnaCountry::SE) {
throw new Klarna_UnsupportedMarketException("Sweden");
}
//Get the PNO/SSN encoding constant.
if ($encoding === null) {
... | php | public function getAddresses(
$pno, $encoding = null, $type = KlarnaFlags::GA_GIVEN
) {
if ($this->_country !== KlarnaCountry::SE) {
throw new Klarna_UnsupportedMarketException("Sweden");
}
//Get the PNO/SSN encoding constant.
if ($encoding === null) {
... | [
"public",
"function",
"getAddresses",
"(",
"$",
"pno",
",",
"$",
"encoding",
"=",
"null",
",",
"$",
"type",
"=",
"KlarnaFlags",
"::",
"GA_GIVEN",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_country",
"!==",
"KlarnaCountry",
"::",
"SE",
")",
"{",
"throw",... | Purpose: The get_addresses function is used to retrieve a customer's
address(es). Using this, the customer is not required to enter any
information, only confirm the one presented to him/her.<br>
The get_addresses function can also be used for companies.<br>
If the customer enters a company number, it will return all ... | [
"Purpose",
":",
"The",
"get_addresses",
"function",
"is",
"used",
"to",
"retrieve",
"a",
"customer",
"s",
"address",
"(",
"es",
")",
".",
"Using",
"this",
"the",
"customer",
"is",
"not",
"required",
"to",
"enter",
"any",
"information",
"only",
"confirm",
"... | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1370-L1455 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1491-L1536 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.addTransaction | public function addTransaction(
$pno, $gender, $flags = KlarnaFlags::NO_FLAG,
$pclass = KlarnaPClass::INVOICE, $encoding = null, $clear = true
) {
$this->_checkLocale(50023);
//Get the PNO/SSN encoding constant.
if ($encoding === null) {
$encoding = $this->getPNO... | php | public function addTransaction(
$pno, $gender, $flags = KlarnaFlags::NO_FLAG,
$pclass = KlarnaPClass::INVOICE, $encoding = null, $clear = true
) {
$this->_checkLocale(50023);
//Get the PNO/SSN encoding constant.
if ($encoding === null) {
$encoding = $this->getPNO... | [
"public",
"function",
"addTransaction",
"(",
"$",
"pno",
",",
"$",
"gender",
",",
"$",
"flags",
"=",
"KlarnaFlags",
"::",
"NO_FLAG",
",",
"$",
"pclass",
"=",
"KlarnaPClass",
"::",
"INVOICE",
",",
"$",
"encoding",
"=",
"null",
",",
"$",
"clear",
"=",
"t... | Assembles and sends the current order to Klarna.<br>
This clears all relevant data if $clear is set to true.<br>
<b>This method returns an array with</b>:<br>
Invoice number<br>
Order status flag<br>
If the flag {@link KlarnaFlags::RETURN_OCR} is used:<br>
Invoice number<br>
OCR number <br>
Order status flag<br>
<b>... | [
"Assembles",
"and",
"sends",
"the",
"current",
"order",
"to",
"Klarna",
".",
"<br",
">",
"This",
"clears",
"all",
"relevant",
"data",
"if",
"$clear",
"is",
"set",
"to",
"true",
".",
"<br",
">"
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1591-L1710 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.activateInvoice | public function activateInvoice(
$invNo, $pclass = KlarnaPClass::INVOICE, $clear = true
) {
$this->_checkInvNo($invNo);
$digestSecret = self::digest(
$this->colon($this->_eid, $invNo, $this->_secret)
);
$paramList = array(
$this->_eid,
$i... | php | public function activateInvoice(
$invNo, $pclass = KlarnaPClass::INVOICE, $clear = true
) {
$this->_checkInvNo($invNo);
$digestSecret = self::digest(
$this->colon($this->_eid, $invNo, $this->_secret)
);
$paramList = array(
$this->_eid,
$i... | [
"public",
"function",
"activateInvoice",
"(",
"$",
"invNo",
",",
"$",
"pclass",
"=",
"KlarnaPClass",
"::",
"INVOICE",
",",
"$",
"clear",
"=",
"true",
")",
"{",
"$",
"this",
"->",
"_checkInvNo",
"(",
"$",
"invNo",
")",
";",
"$",
"digestSecret",
"=",
"se... | Activates previously created invoice
(from {@link Klarna::addTransaction()}).
<b>Note</b>:<br>
If you want to change the shipment type, you can specify it using:
{@link Klarna::setShipmentInfo() setShipmentInfo('delay_adjust', ...)}
with either: {@link KlarnaFlags::NORMAL_SHIPMENT NORMAL_SHIPMENT} or
{@link KlarnaFlag... | [
"Activates",
"previously",
"created",
"invoice",
"(",
"from",
"{",
"@link",
"Klarna",
"::",
"addTransaction",
"()",
"}",
")",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1733-L1761 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.deleteInvoice | public function deleteInvoice($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 deleteInvoice($invNo)
{
$this->_checkInvNo($invNo);
$digestSecret = self::digest(
$this->colon($this->_eid, $invNo, $this->_secret)
);
$paramList = array(
$this->_eid,
$invNo,
$digestSecret
);
self::pr... | [
"public",
"function",
"deleteInvoice",
"(",
"$",
"invNo",
")",
"{",
"$",
"this",
"->",
"_checkInvNo",
"(",
"$",
"invNo",
")",
";",
"$",
"digestSecret",
"=",
"self",
"::",
"digest",
"(",
"$",
"this",
"->",
"colon",
"(",
"$",
"this",
"->",
"_eid",
",",... | Removes a passive invoices which has previously been created with
{@link Klarna::addTransaction()}.
True is returned if the invoice was successfully removed, otherwise an
exception is thrown.<br>
@param string $invNo Invoice number.
@throws KlarnaException
@return bool | [
"Removes",
"a",
"passive",
"invoices",
"which",
"has",
"previously",
"been",
"created",
"with",
"{",
"@link",
"Klarna",
"::",
"addTransaction",
"()",
"}",
".",
"True",
"is",
"returned",
"if",
"the",
"invoice",
"was",
"successfully",
"removed",
"otherwise",
"an... | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1774-L1793 |
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"
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1800-L1824 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.reserveAmount | public function reserveAmount(
$pno, $gender, $amount, $flags = 0, $pclass = KlarnaPClass::INVOICE,
$encoding = null, $clear = true
) {
$this->_checkLocale();
//Get the PNO/SSN encoding constant.
if ($encoding === null) {
$encoding = $this->getPNOEncoding();
... | php | public function reserveAmount(
$pno, $gender, $amount, $flags = 0, $pclass = KlarnaPClass::INVOICE,
$encoding = null, $clear = true
) {
$this->_checkLocale();
//Get the PNO/SSN encoding constant.
if ($encoding === null) {
$encoding = $this->getPNOEncoding();
... | [
"public",
"function",
"reserveAmount",
"(",
"$",
"pno",
",",
"$",
"gender",
",",
"$",
"amount",
",",
"$",
"flags",
"=",
"0",
",",
"$",
"pclass",
"=",
"KlarnaPClass",
"::",
"INVOICE",
",",
"$",
"encoding",
"=",
"null",
",",
"$",
"clear",
"=",
"true",
... | Reserves a purchase amount for a specific customer. <br>
The reservation is valid, by default, for 7 days.<br>
<b>This method returns an array with</b>:<br>
A reservation number (rno)<br>
Order status flag<br>
<b>Order status can be</b>:<br>
{@link KlarnaFlags::ACCEPTED}<br>
{@link KlarnaFlags::PENDING}<br>
{@link Kl... | [
"Reserves",
"a",
"purchase",
"amount",
"for",
"a",
"specific",
"customer",
".",
"<br",
">",
"The",
"reservation",
"is",
"valid",
"by",
"default",
"for",
"7",
"days",
".",
"<br",
">"
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1875-L1985 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L1996-L2014 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2031-L2054 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2067-L2142 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2151-L2171 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2191-L2290 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2337-L2430 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2447-L2478 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.reserveOCR | public function reserveOCR($no, $country = null)
{
$this->_checkNo($no);
if ($country === null) {
if (!$this->_country) {
throw new Klarna_MissingCountryException;
}
$country = $this->_country;
} else {
$this->_checkCountry($cou... | php | public function reserveOCR($no, $country = null)
{
$this->_checkNo($no);
if ($country === null) {
if (!$this->_country) {
throw new Klarna_MissingCountryException;
}
$country = $this->_country;
} else {
$this->_checkCountry($cou... | [
"public",
"function",
"reserveOCR",
"(",
"$",
"no",
",",
"$",
"country",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"_checkNo",
"(",
"$",
"no",
")",
";",
"if",
"(",
"$",
"country",
"===",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_co... | Reserves a specified number of OCR numbers.<br>
For the specified country or the {@link Klarna::setCountry() set country}.<br>
@param int $no The number of OCR numbers to reserve.
@param int $country {@link KlarnaCountry} constant.
@throws KlarnaException
@return array An array of OCR numbers. | [
"Reserves",
"a",
"specified",
"number",
"of",
"OCR",
"numbers",
".",
"<br",
">",
"For",
"the",
"specified",
"country",
"or",
"the",
"{",
"@link",
"Klarna",
"::",
"setCountry",
"()",
"set",
"country",
"}",
".",
"<br",
">"
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2491-L2516 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.hasAccount | public function hasAccount($pno, $encoding = null)
{
//Get the PNO/SSN encoding constant.
if ($encoding === null) {
$encoding = $this->getPNOEncoding();
}
$this->_checkPNO($pno, $encoding);
$digest = self::digest(
$this->colon($this->_eid, $pno, $thi... | php | public function hasAccount($pno, $encoding = null)
{
//Get the PNO/SSN encoding constant.
if ($encoding === null) {
$encoding = $this->getPNOEncoding();
}
$this->_checkPNO($pno, $encoding);
$digest = self::digest(
$this->colon($this->_eid, $pno, $thi... | [
"public",
"function",
"hasAccount",
"(",
"$",
"pno",
",",
"$",
"encoding",
"=",
"null",
")",
"{",
"//Get the PNO/SSN encoding constant.",
"if",
"(",
"$",
"encoding",
"===",
"null",
")",
"{",
"$",
"encoding",
"=",
"$",
"this",
"->",
"getPNOEncoding",
"(",
"... | Checks if the specified SSN/PNO has an part payment account with Klarna.
@param string $pno Social security number, Personal number, ...
@param int $encoding {@link KlarnaEncoding PNO Encoding} constant.
@throws KlarnaException
@return bool True, if customer has an account. | [
"Checks",
"if",
"the",
"specified",
"SSN",
"/",
"PNO",
"has",
"an",
"part",
"payment",
"account",
"with",
"Klarna",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2528-L2553 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.addArtNo | public function addArtNo($qty, $artNo)
{
$this->_checkQty($qty);
$this->_checkArtNo($artNo);
if (!is_array($this->artNos)) {
$this->artNos = array();
}
$this->artNos[] = array('artno' => $artNo, 'qty' => $qty);
} | php | public function addArtNo($qty, $artNo)
{
$this->_checkQty($qty);
$this->_checkArtNo($artNo);
if (!is_array($this->artNos)) {
$this->artNos = array();
}
$this->artNos[] = array('artno' => $artNo, 'qty' => $qty);
} | [
"public",
"function",
"addArtNo",
"(",
"$",
"qty",
",",
"$",
"artNo",
")",
"{",
"$",
"this",
"->",
"_checkQty",
"(",
"$",
"qty",
")",
";",
"$",
"this",
"->",
"_checkArtNo",
"(",
"$",
"artNo",
")",
";",
"if",
"(",
"!",
"is_array",
"(",
"$",
"this"... | Adds an article number and quantity to be used in
{@link Klarna::activatePart()}, {@link Klarna::creditPart()}
and {@link Klarna::invoicePartAmount()}.
@param int $qty Quantity of specified article.
@param string $artNo Article number.
@throws KlarnaException
@return void | [
"Adds",
"an",
"article",
"number",
"and",
"quantity",
"to",
"be",
"used",
"in",
"{",
"@link",
"Klarna",
"::",
"activatePart",
"()",
"}",
"{",
"@link",
"Klarna",
"::",
"creditPart",
"()",
"}",
"and",
"{",
"@link",
"Klarna",
"::",
"invoicePartAmount",
"()",
... | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2566-L2576 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2607-L2643 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2654-L2674 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2687-L2708 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.returnAmount | public function returnAmount(
$invNo, $amount, $vat, $flags = KlarnaFlags::INC_VAT, $description = ""
) {
$this->_checkInvNo($invNo);
$this->_checkAmount($amount);
$this->_checkVAT($vat);
$this->_checkInt($flags, 'flags');
if ($description == null) {
$des... | php | public function returnAmount(
$invNo, $amount, $vat, $flags = KlarnaFlags::INC_VAT, $description = ""
) {
$this->_checkInvNo($invNo);
$this->_checkAmount($amount);
$this->_checkVAT($vat);
$this->_checkInt($flags, 'flags');
if ($description == null) {
$des... | [
"public",
"function",
"returnAmount",
"(",
"$",
"invNo",
",",
"$",
"amount",
",",
"$",
"vat",
",",
"$",
"flags",
"=",
"KlarnaFlags",
"::",
"INC_VAT",
",",
"$",
"description",
"=",
"\"\"",
")",
"{",
"$",
"this",
"->",
"_checkInvNo",
"(",
"$",
"invNo",
... | Gives discounts on invoices.<br>
If you are using standard integration and the purchase is not yet
activated (you have not yet delivered the goods), <br>
just change the article list in our online interface Klarna Online.<br>
<b>Flags can be</b>:<br>
{@link KlarnaFlags::INC_VAT}<br>
{@link KlarnaFlags::NO_FLAG}, <b>NO... | [
"Gives",
"discounts",
"on",
"invoices",
".",
"<br",
">",
"If",
"you",
"are",
"using",
"standard",
"integration",
"and",
"the",
"purchase",
"is",
"not",
"yet",
"activated",
"(",
"you",
"have",
"not",
"yet",
"delivered",
"the",
"goods",
")",
"<br",
">",
"j... | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2791-L2819 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2831-L2849 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2865-L2904 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2917-L2938 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.updateChargeAmount | public function updateChargeAmount($invNo, $type, $newAmount)
{
$this->_checkInvNo($invNo);
$this->_checkInt($type, 'type');
$this->_checkAmount($newAmount);
if ($type === KlarnaFlags::IS_SHIPMENT) {
$type = 1;
} else if ($type === KlarnaFlags::IS_HANDLING) {
... | php | public function updateChargeAmount($invNo, $type, $newAmount)
{
$this->_checkInvNo($invNo);
$this->_checkInt($type, 'type');
$this->_checkAmount($newAmount);
if ($type === KlarnaFlags::IS_SHIPMENT) {
$type = 1;
} else if ($type === KlarnaFlags::IS_HANDLING) {
... | [
"public",
"function",
"updateChargeAmount",
"(",
"$",
"invNo",
",",
"$",
"type",
",",
"$",
"newAmount",
")",
"{",
"$",
"this",
"->",
"_checkInvNo",
"(",
"$",
"invNo",
")",
";",
"$",
"this",
"->",
"_checkInt",
"(",
"$",
"type",
",",
"'type'",
")",
";"... | Changes the amount of a fee (e.g. the invoice fee) in a passive invoice.
<b>Type can be</b>:<br>
{@link KlarnaFlags::IS_SHIPMENT}<br>
{@link KlarnaFlags::IS_HANDLING}<br>
@param string $invNo Invoice number.
@param int $type Charge type.
@param int $newAmount The new amount for the charge.
@throws Kl... | [
"Changes",
"the",
"amount",
"of",
"a",
"fee",
"(",
"e",
".",
"g",
".",
"the",
"invoice",
"fee",
")",
"in",
"a",
"passive",
"invoice",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2955-L2982 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L2993-L3025 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3040-L3066 |
Subscribo/klarna-invoice-sdk-wrapped | src/Klarna.php | Klarna.checkOrderStatus | public function checkOrderStatus($id, $type = 0)
{
$this->_checkArgument($id, "id");
$this->_checkInt($type, 'type');
if ($type !== 0 && $type !== 1) {
throw new Klarna_InvalidTypeException(
'type', "0 or 1"
);
}
$digestSecret = self:... | php | public function checkOrderStatus($id, $type = 0)
{
$this->_checkArgument($id, "id");
$this->_checkInt($type, 'type');
if ($type !== 0 && $type !== 1) {
throw new Klarna_InvalidTypeException(
'type', "0 or 1"
);
}
$digestSecret = self:... | [
"public",
"function",
"checkOrderStatus",
"(",
"$",
"id",
",",
"$",
"type",
"=",
"0",
")",
"{",
"$",
"this",
"->",
"_checkArgument",
"(",
"$",
"id",
",",
"\"id\"",
")",
";",
"$",
"this",
"->",
"_checkInt",
"(",
"$",
"type",
",",
"'type'",
")",
";",... | Returns the current order status for a specific reservation or invoice.
Use this when {@link Klarna::addTransaction()} or
{@link Klarna::reserveAmount()} returns a {@link KlarnaFlags::PENDING}
status.
<b>Order status can be</b>:<br>
{@link KlarnaFlags::ACCEPTED}<br>
{@link KlarnaFlags::PENDING}<br>
{@link KlarnaFlags:... | [
"Returns",
"the",
"current",
"order",
"status",
"for",
"a",
"specific",
"reservation",
"or",
"invoice",
".",
"Use",
"this",
"when",
"{",
"@link",
"Klarna",
"::",
"addTransaction",
"()",
"}",
"or",
"{",
"@link",
"Klarna",
"::",
"reserveAmount",
"()",
"}",
"... | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3086-L3110 |
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",
"."
] | train | https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/Klarna.php#L3123-L3144 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.