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
koala-framework/koala-framework
Kwf/Media/Image.php
Kwf_Media_Image.getResponsiveWidthSteps
public static function getResponsiveWidthSteps($dim, $imageDimensions) { $ret = array(); if (is_string($imageDimensions)) { if (!file_exists($imageDimensions)) { return array(); } $size = getimagesize($imageDimensions); $imageDimensions...
php
public static function getResponsiveWidthSteps($dim, $imageDimensions) { $ret = array(); if (is_string($imageDimensions)) { if (!file_exists($imageDimensions)) { return array(); } $size = getimagesize($imageDimensions); $imageDimensions...
[ "public", "static", "function", "getResponsiveWidthSteps", "(", "$", "dim", ",", "$", "imageDimensions", ")", "{", "$", "ret", "=", "array", "(", ")", ";", "if", "(", "is_string", "(", "$", "imageDimensions", ")", ")", "{", "if", "(", "!", "file_exists",...
Returns supported image-widths of specific image with given base-dimensions
[ "Returns", "supported", "image", "-", "widths", "of", "specific", "image", "with", "given", "base", "-", "dimensions" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Media/Image.php#L30-L83
koala-framework/koala-framework
Kwf/Media/Image.php
Kwf_Media_Image.getExifRotation
public static function getExifRotation($source) { if (!Kwf_Registry::get('config')->image->autoExifRotate) { return 0; } $handle = fopen($source, 'rb'); // b for windows compatibility // Check if image is jpg file if (fread($handle, 2) != chr(0xFF).chr(0xD8)) { ...
php
public static function getExifRotation($source) { if (!Kwf_Registry::get('config')->image->autoExifRotate) { return 0; } $handle = fopen($source, 'rb'); // b for windows compatibility // Check if image is jpg file if (fread($handle, 2) != chr(0xFF).chr(0xD8)) { ...
[ "public", "static", "function", "getExifRotation", "(", "$", "source", ")", "{", "if", "(", "!", "Kwf_Registry", "::", "get", "(", "'config'", ")", "->", "image", "->", "autoExifRotate", ")", "{", "return", "0", ";", "}", "$", "handle", "=", "fopen", "...
Got information from http://www.media.mit.edu/pia/Research/deepview/exif.html and http://www.impulseadventure.com/photo/exif-orientation.html
[ "Got", "information", "from", "http", ":", "//", "www", ".", "media", ".", "mit", ".", "edu", "/", "pia", "/", "Research", "/", "deepview", "/", "exif", ".", "html", "and", "http", ":", "//", "www", ".", "impulseadventure", ".", "com", "/", "photo", ...
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Media/Image.php#L94-L173
koala-framework/koala-framework
Kwf/Media/Image.php
Kwf_Media_Image.getHandyScaleFactor
public static function getHandyScaleFactor($original) { $targetSize = array(600, 600, 'cover' => false); if (is_string($original)) { if (!file_exists($original)) return 1; $size = getimagesize($original); $original = array( 'width' => $size[0], ...
php
public static function getHandyScaleFactor($original) { $targetSize = array(600, 600, 'cover' => false); if (is_string($original)) { if (!file_exists($original)) return 1; $size = getimagesize($original); $original = array( 'width' => $size[0], ...
[ "public", "static", "function", "getHandyScaleFactor", "(", "$", "original", ")", "{", "$", "targetSize", "=", "array", "(", "600", ",", "600", ",", "'cover'", "=>", "false", ")", ";", "if", "(", "is_string", "(", "$", "original", ")", ")", "{", "if", ...
Returns an image with a size which should be good to work with. Acutally this is a 600x600 max-width. If it's smaller in both dimensions it will keep it's original size.
[ "Returns", "an", "image", "with", "a", "size", "which", "should", "be", "good", "to", "work", "with", ".", "Acutally", "this", "is", "a", "600x600", "max", "-", "width", ".", "If", "it", "s", "smaller", "in", "both", "dimensions", "it", "will", "keep",...
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Media/Image.php#L180-L203
koala-framework/koala-framework
Kwf/Media/Image.php
Kwf_Media_Image.calculateScaleDimensions
public static function calculateScaleDimensions($source, $targetSize) { // Get size of image (handle different param-possibilities) if (is_string($source)) { $sourceSize = @getimagesize($source); $sourceSize['rotation'] = self::getExifRotation($source); } else if ($s...
php
public static function calculateScaleDimensions($source, $targetSize) { // Get size of image (handle different param-possibilities) if (is_string($source)) { $sourceSize = @getimagesize($source); $sourceSize['rotation'] = self::getExifRotation($source); } else if ($s...
[ "public", "static", "function", "calculateScaleDimensions", "(", "$", "source", ",", "$", "targetSize", ")", "{", "// Get size of image (handle different param-possibilities)", "if", "(", "is_string", "(", "$", "source", ")", ")", "{", "$", "sourceSize", "=", "@", ...
targetSize options: width, height, cover, aspectRatio
[ "targetSize", "options", ":", "width", "height", "cover", "aspectRatio" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Media/Image.php#L208-L418
koala-framework/koala-framework
Kwf/User/Auth/PasswordFields.php
Kwf_User_Auth_PasswordFields.generatePasswordSalt
public function generatePasswordSalt(Kwf_Model_Row_Interface $row) { mt_srand((double)microtime()*1000000); $row->password_salt = substr(md5(uniqid(mt_rand(), true)), 0, 10); }
php
public function generatePasswordSalt(Kwf_Model_Row_Interface $row) { mt_srand((double)microtime()*1000000); $row->password_salt = substr(md5(uniqid(mt_rand(), true)), 0, 10); }
[ "public", "function", "generatePasswordSalt", "(", "Kwf_Model_Row_Interface", "$", "row", ")", "{", "mt_srand", "(", "(", "double", ")", "microtime", "(", ")", "*", "1000000", ")", ";", "$", "row", "->", "password_salt", "=", "substr", "(", "md5", "(", "un...
not part of interface but used by Kwf_User_EditRow
[ "not", "part", "of", "interface", "but", "used", "by", "Kwf_User_EditRow" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/User/Auth/PasswordFields.php#L33-L37
koala-framework/koala-framework
Kwf/Component/Renderer/Abstract.php
Kwf_Component_Renderer_Abstract.renderComponent
public function renderComponent($component, &$hasDynamicParts = false) { if (Kwf_Component_Data_Root::getShowInvisible()) { $hasDynamicParts = true; } $helper = new Kwf_Component_View_Helper_Component(); $helper->setRenderer($this); $content = $helper->component(...
php
public function renderComponent($component, &$hasDynamicParts = false) { if (Kwf_Component_Data_Root::getShowInvisible()) { $hasDynamicParts = true; } $helper = new Kwf_Component_View_Helper_Component(); $helper->setRenderer($this); $content = $helper->component(...
[ "public", "function", "renderComponent", "(", "$", "component", ",", "&", "$", "hasDynamicParts", "=", "false", ")", "{", "if", "(", "Kwf_Component_Data_Root", "::", "getShowInvisible", "(", ")", ")", "{", "$", "hasDynamicParts", "=", "true", ";", "}", "$", ...
Renders a single component without master
[ "Renders", "a", "single", "component", "without", "master" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Component/Renderer/Abstract.php#L39-L57
koala-framework/koala-framework
Kwf/Component/Renderer/Abstract.php
Kwf_Component_Renderer_Abstract.getTemplate
public function getTemplate(Kwf_Component_Data $component, $type) { if ($type == 'Master') { if (Kwc_Abstract::hasSetting($component->componentClass, 'masterTemplate')) { return Kwc_Abstract::getSetting($component->componentClass, 'masterTemplate'); } } ...
php
public function getTemplate(Kwf_Component_Data $component, $type) { if ($type == 'Master') { if (Kwc_Abstract::hasSetting($component->componentClass, 'masterTemplate')) { return Kwc_Abstract::getSetting($component->componentClass, 'masterTemplate'); } } ...
[ "public", "function", "getTemplate", "(", "Kwf_Component_Data", "$", "component", ",", "$", "type", ")", "{", "if", "(", "$", "type", "==", "'Master'", ")", "{", "if", "(", "Kwc_Abstract", "::", "hasSetting", "(", "$", "component", "->", "componentClass", ...
overridden by Renderer_Mail to use mail templates
[ "overridden", "by", "Renderer_Mail", "to", "use", "mail", "templates" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Component/Renderer/Abstract.php#L62-L72
koala-framework/koala-framework
Kwf/Component/Renderer/Abstract.php
Kwf_Component_Renderer_Abstract._renderPass1
protected function _renderPass1($ret, &$pass1Cacheable = true) { static $benchmarkEnabled; if (!isset($benchmarkEnabled)) $benchmarkEnabled = Kwf_Benchmark::isEnabled(); $offset = 0; while ($target = $this->_getNextRenderTarget($ret, 1, $offset)) { if ($benchmarkEnabled)...
php
protected function _renderPass1($ret, &$pass1Cacheable = true) { static $benchmarkEnabled; if (!isset($benchmarkEnabled)) $benchmarkEnabled = Kwf_Benchmark::isEnabled(); $offset = 0; while ($target = $this->_getNextRenderTarget($ret, 1, $offset)) { if ($benchmarkEnabled)...
[ "protected", "function", "_renderPass1", "(", "$", "ret", ",", "&", "$", "pass1Cacheable", "=", "true", ")", "{", "static", "$", "benchmarkEnabled", ";", "if", "(", "!", "isset", "(", "$", "benchmarkEnabled", ")", ")", "$", "benchmarkEnabled", "=", "Kwf_Be...
Render components (ie. expand <kwc ...>) Pass 1 for content that can be stored in fullPage cache, 2 for everything else. 2 includes 1, so calling just with 2 also works @param string render content @param bool if returned contents is cacheable
[ "Render", "components", "(", "ie", ".", "expand", "<kwc", "...", ">", ")" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Component/Renderer/Abstract.php#L311-L370
koala-framework/koala-framework
Kwf/Component/Renderer/Abstract.php
Kwf_Component_Renderer_Abstract._renderPass2
protected function _renderPass2($ret, &$hasDynamicParts = false) { //execute all plugins that where added in pass 1 $ret = $this->_findAndExecutePlugins($ret, self::PLUGIN_TYPE_USECACHE, $hasDynamicParts); $ret = $this->_findAndExecutePlugins($ret, self::PLUGIN_TYPE_BEFORE, $hasDynamicParts)...
php
protected function _renderPass2($ret, &$hasDynamicParts = false) { //execute all plugins that where added in pass 1 $ret = $this->_findAndExecutePlugins($ret, self::PLUGIN_TYPE_USECACHE, $hasDynamicParts); $ret = $this->_findAndExecutePlugins($ret, self::PLUGIN_TYPE_BEFORE, $hasDynamicParts)...
[ "protected", "function", "_renderPass2", "(", "$", "ret", ",", "&", "$", "hasDynamicParts", "=", "false", ")", "{", "//execute all plugins that where added in pass 1", "$", "ret", "=", "$", "this", "->", "_findAndExecutePlugins", "(", "$", "ret", ",", "self", ":...
Render components (ie. expand <kwc ...>) Pass 1 for content that can be stored in fullPage cache, 2 for everything else. 2 includes 1, so calling just with 2 also works @param string render content
[ "Render", "components", "(", "ie", ".", "expand", "<kwc", "...", ">", ")" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Component/Renderer/Abstract.php#L405-L505
koala-framework/koala-framework
Kwf/View/Helper/FormField.php
Kwf_View_Helper_FormField.returnFormField
public function returnFormField($vars) { extract($vars); $ret = ''; if (isset($mask)) $ret .= '{' . $mask . '}'; if (isset($preHtml)) { $ret .= $preHtml; } if (isset($html)) { $ret .= $html; } elseif (isset($items)) { foreach ($items as $i) { ...
php
public function returnFormField($vars) { extract($vars); $ret = ''; if (isset($mask)) $ret .= '{' . $mask . '}'; if (isset($preHtml)) { $ret .= $preHtml; } if (isset($html)) { $ret .= $html; } elseif (isset($items)) { foreach ($items as $i) { ...
[ "public", "function", "returnFormField", "(", "$", "vars", ")", "{", "extract", "(", "$", "vars", ")", ";", "$", "ret", "=", "''", ";", "if", "(", "isset", "(", "$", "mask", ")", ")", "$", "ret", ".=", "'{'", ".", "$", "mask", ".", "'}'", ";", ...
Diese Methode returned. Die eigentliche (obere) funktion wurde aus rückwärtskompatibilität belassen. Diese Methode wird zB im getTemplateVars der MultiCheckbox verwendet.
[ "Diese", "Methode", "returned", ".", "Die", "eigentliche", "(", "obere", ")", "funktion", "wurde", "aus", "rückwärtskompatibilität", "belassen", ".", "Diese", "Methode", "wird", "zB", "im", "getTemplateVars", "der", "MultiCheckbox", "verwendet", "." ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/View/Helper/FormField.php#L14-L33
koala-framework/koala-framework
Kwf/Util/Punycode.php
Kwf_Util_Punycode.set_parameter
public function set_parameter($option, $value = false) { if (!is_array($option)) { $option = array($option => $value); } foreach ($option as $k => $v) { switch ($k) { case 'encoding': switch ($v) { case 'utf8': ...
php
public function set_parameter($option, $value = false) { if (!is_array($option)) { $option = array($option => $value); } foreach ($option as $k => $v) { switch ($k) { case 'encoding': switch ($v) { case 'utf8': ...
[ "public", "function", "set_parameter", "(", "$", "option", ",", "$", "value", "=", "false", ")", "{", "if", "(", "!", "is_array", "(", "$", "option", ")", ")", "{", "$", "option", "=", "array", "(", "$", "option", "=>", "$", "value", ")", ";", "}...
Sets a new option value. Available options and values: [encoding - Use either UTF-8, UCS4 as array or UCS4 as string as input ('utf8' for UTF-8, 'ucs4_string' and 'ucs4_array' respectively for UCS4); The output is always UTF-8] [overlong - Unicode does not allow unnecessarily long encodings of chars, to allow this, set...
[ "Sets", "a", "new", "option", "value", ".", "Available", "options", "and", "values", ":", "[", "encoding", "-", "Use", "either", "UTF", "-", "8", "UCS4", "as", "array", "or", "UCS4", "as", "string", "as", "input", "(", "utf8", "for", "UTF", "-", "8",...
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/Punycode.php#L124-L158
koala-framework/koala-framework
Kwf/Util/Punycode.php
Kwf_Util_Punycode._decode
protected function _decode($encoded) { $decoded = array(); // find the Punycode prefix if (!preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $encoded)) { $this->_error('This is not a punycode string'); return false; } $encode_test = preg_r...
php
protected function _decode($encoded) { $decoded = array(); // find the Punycode prefix if (!preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $encoded)) { $this->_error('This is not a punycode string'); return false; } $encode_test = preg_r...
[ "protected", "function", "_decode", "(", "$", "encoded", ")", "{", "$", "decoded", "=", "array", "(", ")", ";", "// find the Punycode prefix", "if", "(", "!", "preg_match", "(", "'!^'", ".", "preg_quote", "(", "$", "this", "->", "_punycode_prefix", ",", "'...
The actual decoding algorithm @param string @return mixed
[ "The", "actual", "decoding", "algorithm" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/Punycode.php#L391-L441
koala-framework/koala-framework
Kwf/Util/Punycode.php
Kwf_Util_Punycode._encode
protected function _encode($decoded) { // We cannot encode a domain name containing the Punycode prefix $extract = strlen($this->_punycode_prefix); $check_pref = $this->_utf8_to_ucs4($this->_punycode_prefix); $check_deco = array_slice($decoded, 0, $extract); if ($check_pref ...
php
protected function _encode($decoded) { // We cannot encode a domain name containing the Punycode prefix $extract = strlen($this->_punycode_prefix); $check_pref = $this->_utf8_to_ucs4($this->_punycode_prefix); $check_deco = array_slice($decoded, 0, $extract); if ($check_pref ...
[ "protected", "function", "_encode", "(", "$", "decoded", ")", "{", "// We cannot encode a domain name containing the Punycode prefix", "$", "extract", "=", "strlen", "(", "$", "this", "->", "_punycode_prefix", ")", ";", "$", "check_pref", "=", "$", "this", "->", "...
The actual encoding algorithm @param string @return mixed
[ "The", "actual", "encoding", "algorithm" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/Punycode.php#L448-L533
koala-framework/koala-framework
Kwf/Util/Punycode.php
Kwf_Util_Punycode._adapt
protected function _adapt($delta, $npoints, $is_first) { $delta = intval($is_first ? ($delta / $this->_damp) : ($delta / 2)); $delta += intval($delta / $npoints); for ($k = 0; $delta > (($this->_base - $this->_tmin) * $this->_tmax) / 2; $k += $this->_base) { $delta = intval($delt...
php
protected function _adapt($delta, $npoints, $is_first) { $delta = intval($is_first ? ($delta / $this->_damp) : ($delta / 2)); $delta += intval($delta / $npoints); for ($k = 0; $delta > (($this->_base - $this->_tmin) * $this->_tmax) / 2; $k += $this->_base) { $delta = intval($delt...
[ "protected", "function", "_adapt", "(", "$", "delta", ",", "$", "npoints", ",", "$", "is_first", ")", "{", "$", "delta", "=", "intval", "(", "$", "is_first", "?", "(", "$", "delta", "/", "$", "this", "->", "_damp", ")", ":", "(", "$", "delta", "/...
Adapt the bias according to the current code point and position @param int $delta @param int $npoints @param int $is_first @return int
[ "Adapt", "the", "bias", "according", "to", "the", "current", "code", "point", "and", "position" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/Punycode.php#L542-L550
koala-framework/koala-framework
Kwf/Util/Punycode.php
Kwf_Util_Punycode._decode_digit
protected function _decode_digit($cp) { $cp = ord($cp); return ($cp - 48 < 10) ? $cp - 22 : (($cp - 65 < 26) ? $cp - 65 : (($cp - 97 < 26) ? $cp - 97 : $this->_base)); }
php
protected function _decode_digit($cp) { $cp = ord($cp); return ($cp - 48 < 10) ? $cp - 22 : (($cp - 65 < 26) ? $cp - 65 : (($cp - 97 < 26) ? $cp - 97 : $this->_base)); }
[ "protected", "function", "_decode_digit", "(", "$", "cp", ")", "{", "$", "cp", "=", "ord", "(", "$", "cp", ")", ";", "return", "(", "$", "cp", "-", "48", "<", "10", ")", "?", "$", "cp", "-", "22", ":", "(", "(", "$", "cp", "-", "65", "<", ...
Decode a certain digit @param int $cp @return int
[ "Decode", "a", "certain", "digit" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/Punycode.php#L567-L571
koala-framework/koala-framework
Kwf/Util/Punycode.php
Kwf_Util_Punycode._ucs4_to_utf8
protected function _ucs4_to_utf8($input) { $output = ''; foreach ($input as $k => $v) { if ($v < 128) { // 7bit are transferred literally $output .= chr($v); } elseif ($v < (1 << 11)) { // 2 bytes $output .= chr(192+($v >> 6)).chr(128+($v & 63)...
php
protected function _ucs4_to_utf8($input) { $output = ''; foreach ($input as $k => $v) { if ($v < 128) { // 7bit are transferred literally $output .= chr($v); } elseif ($v < (1 << 11)) { // 2 bytes $output .= chr(192+($v >> 6)).chr(128+($v & 63)...
[ "protected", "function", "_ucs4_to_utf8", "(", "$", "input", ")", "{", "$", "output", "=", "''", ";", "foreach", "(", "$", "input", "as", "$", "k", "=>", "$", "v", ")", "{", "if", "(", "$", "v", "<", "128", ")", "{", "// 7bit are transferred literall...
Convert UCS-4 string into UTF-8 string See _utf8_to_ucs4() for details @param string $input @return string
[ "Convert", "UCS", "-", "4", "string", "into", "UTF", "-", "8", "string", "See", "_utf8_to_ucs4", "()", "for", "details" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/Punycode.php#L884-L904
koala-framework/koala-framework
Kwf/Component/Cache/Memory.php
Kwf_Component_Cache_Memory._getFileNameForCacheId
private static function _getFileNameForCacheId($cacheId) { $cacheId = preg_replace('#[^a-zA-Z0-9_-]#', '_', $cacheId); if (strlen($cacheId) > 50) { $cacheId = substr($cacheId, 0, 50).md5($cacheId); } return "cache/view/".self::CACHE_VERSION.'-'.$cacheId; }
php
private static function _getFileNameForCacheId($cacheId) { $cacheId = preg_replace('#[^a-zA-Z0-9_-]#', '_', $cacheId); if (strlen($cacheId) > 50) { $cacheId = substr($cacheId, 0, 50).md5($cacheId); } return "cache/view/".self::CACHE_VERSION.'-'.$cacheId; }
[ "private", "static", "function", "_getFileNameForCacheId", "(", "$", "cacheId", ")", "{", "$", "cacheId", "=", "preg_replace", "(", "'#[^a-zA-Z0-9_-]#'", ",", "'_'", ",", "$", "cacheId", ")", ";", "if", "(", "strlen", "(", "$", "cacheId", ")", ">", "50", ...
for 'file' backend
[ "for", "file", "backend" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Component/Cache/Memory.php#L36-L43
koala-framework/koala-framework
Kwf/Component/Cache/Memory.php
Kwf_Component_Cache_Memory._clean
public function _clean() { $be = Kwf_Cache_Simple::getBackend(); if ($be == 'memcache') { return Kwf_Cache_Simple::getMemcache()->flush(); } else if ($be == 'file') { foreach (glob('cache/view/*') as $i) { unlink($i); } return t...
php
public function _clean() { $be = Kwf_Cache_Simple::getBackend(); if ($be == 'memcache') { return Kwf_Cache_Simple::getMemcache()->flush(); } else if ($be == 'file') { foreach (glob('cache/view/*') as $i) { unlink($i); } return t...
[ "public", "function", "_clean", "(", ")", "{", "$", "be", "=", "Kwf_Cache_Simple", "::", "getBackend", "(", ")", ";", "if", "(", "$", "be", "==", "'memcache'", ")", "{", "return", "Kwf_Cache_Simple", "::", "getMemcache", "(", ")", "->", "flush", "(", "...
Internal function only ment to be used by unit tests @internal
[ "Internal", "function", "only", "ment", "to", "be", "used", "by", "unit", "tests" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Component/Cache/Memory.php#L125-L138
koala-framework/koala-framework
Kwc/Shop/Cart/Checkout/Payment/Wirecard/LogModel.php
Kwc_Shop_Cart_Checkout_Payment_Wirecard_LogModel.getEncodedCallback
public static function getEncodedCallback($ipnCallback, $data = array()) { $ret = 'kwf:'; $data = array( 'data' => $data, 'cb' => $ipnCallback ); $data = serialize($data); $ret .= substr(Kwf_Util_Hash::hash($data), 0, 10); $data = base64_encode...
php
public static function getEncodedCallback($ipnCallback, $data = array()) { $ret = 'kwf:'; $data = array( 'data' => $data, 'cb' => $ipnCallback ); $data = serialize($data); $ret .= substr(Kwf_Util_Hash::hash($data), 0, 10); $data = base64_encode...
[ "public", "static", "function", "getEncodedCallback", "(", "$", "ipnCallback", ",", "$", "data", "=", "array", "(", ")", ")", "{", "$", "ret", "=", "'kwf:'", ";", "$", "data", "=", "array", "(", "'data'", "=>", "$", "data", ",", "'cb'", "=>", "$", ...
Muss in "custom" von der bezahlung gespeichert werden
[ "Muss", "in", "custom", "von", "der", "bezahlung", "gespeichert", "werden" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Shop/Cart/Checkout/Payment/Wirecard/LogModel.php#L18-L33
koala-framework/koala-framework
Kwf/Component/Layout/Abstract.php
Kwf_Component_Layout_Abstract.getChildContentWidth
public function getChildContentWidth(Kwf_Component_Data $data, Kwf_Component_Data $child) { $ret = $this->getContentWidth($data); if ($this->_hasSetting('contentWidthSubtract')) { $ret -= $this->_getSetting('contentWidthSubtract'); } return $ret; }
php
public function getChildContentWidth(Kwf_Component_Data $data, Kwf_Component_Data $child) { $ret = $this->getContentWidth($data); if ($this->_hasSetting('contentWidthSubtract')) { $ret -= $this->_getSetting('contentWidthSubtract'); } return $ret; }
[ "public", "function", "getChildContentWidth", "(", "Kwf_Component_Data", "$", "data", ",", "Kwf_Component_Data", "$", "child", ")", "{", "$", "ret", "=", "$", "this", "->", "getContentWidth", "(", "$", "data", ")", ";", "if", "(", "$", "this", "->", "_hasS...
Returns the contentWidth of a given child Can be overridden to adapt the available child width Use 'contentWidthSubtract' setting to subtract a fixed amount from getContentWidth() value @return int
[ "Returns", "the", "contentWidth", "of", "a", "given", "child" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Component/Layout/Abstract.php#L152-L159
koala-framework/koala-framework
Kwf/Assets/Package.php
Kwf_Assets_Package.getBuildContents
public function getBuildContents($mimeType, $language) { if ($mimeType == 'text/javascript') $ext = 'js'; else if ($mimeType == 'text/javascript; defer') $ext = 'defer.js'; else if ($mimeType == 'text/css') $ext = 'css'; $cacheId = Kwf_Assets_Dispatcher::getInstance()->getCacheIdByP...
php
public function getBuildContents($mimeType, $language) { if ($mimeType == 'text/javascript') $ext = 'js'; else if ($mimeType == 'text/javascript; defer') $ext = 'defer.js'; else if ($mimeType == 'text/css') $ext = 'css'; $cacheId = Kwf_Assets_Dispatcher::getInstance()->getCacheIdByP...
[ "public", "function", "getBuildContents", "(", "$", "mimeType", ",", "$", "language", ")", "{", "if", "(", "$", "mimeType", "==", "'text/javascript'", ")", "$", "ext", "=", "'js'", ";", "else", "if", "(", "$", "mimeType", "==", "'text/javascript; defer'", ...
Get built contents of a package, to be used by eg. mails
[ "Get", "built", "contents", "of", "a", "package", "to", "be", "used", "by", "eg", ".", "mails" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Assets/Package.php#L78-L103
koala-framework/koala-framework
Kwc/Shop/Cart/Checkout/Payment/Wirecard/ConfirmLink/Component.php
Kwc_Shop_Cart_Checkout_Payment_Wirecard_ConfirmLink_Component.buildWirecardButtonHtml
public static function buildWirecardButtonHtml($params, $payment, $order) { $wirecardCustomerId = $payment->getBaseProperty('wirecard.customerId'); $wirecardSecret = $payment->getBaseProperty('wirecard.secret'); if (!$wirecardCustomerId || !$wirecardSecret) { throw new Kwf_Except...
php
public static function buildWirecardButtonHtml($params, $payment, $order) { $wirecardCustomerId = $payment->getBaseProperty('wirecard.customerId'); $wirecardSecret = $payment->getBaseProperty('wirecard.secret'); if (!$wirecardCustomerId || !$wirecardSecret) { throw new Kwf_Except...
[ "public", "static", "function", "buildWirecardButtonHtml", "(", "$", "params", ",", "$", "payment", ",", "$", "order", ")", "{", "$", "wirecardCustomerId", "=", "$", "payment", "->", "getBaseProperty", "(", "'wirecard.customerId'", ")", ";", "$", "wirecardSecret...
used in trl
[ "used", "in", "trl" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Shop/Cart/Checkout/Payment/Wirecard/ConfirmLink/Component.php#L27-L72
koala-framework/koala-framework
Kwc/Basic/Table/Component.php
Kwc_Basic_Table_Component.addDefaultCssClasses
public static function addDefaultCssClasses($dataArray, $rowStyles) { $count = 0; $ret = array(); foreach ($dataArray as $dataItem) { if (!isset($dataItem['cssStyle'])) { $dataItem['cssClass'] = $count%2 == 0 ? 'odd' : 'even'; $dataItem['htmlTag'] ...
php
public static function addDefaultCssClasses($dataArray, $rowStyles) { $count = 0; $ret = array(); foreach ($dataArray as $dataItem) { if (!isset($dataItem['cssStyle'])) { $dataItem['cssClass'] = $count%2 == 0 ? 'odd' : 'even'; $dataItem['htmlTag'] ...
[ "public", "static", "function", "addDefaultCssClasses", "(", "$", "dataArray", ",", "$", "rowStyles", ")", "{", "$", "count", "=", "0", ";", "$", "ret", "=", "array", "(", ")", ";", "foreach", "(", "$", "dataArray", "as", "$", "dataItem", ")", "{", "...
used from Kwc_Basic_Table_Trl_Component
[ "used", "from", "Kwc_Basic_Table_Trl_Component" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Basic/Table/Component.php#L76-L105
koala-framework/koala-framework
Kwc/Basic/LinkTag/Intern/Trl/Events.php
Kwc_Basic_LinkTag_Intern_Trl_Events._getIdsFromRecursiveEvent
private function _getIdsFromRecursiveEvent(Kwf_Component_Event_Component_RecursiveAbstract $event) { $c = $event->component->chained; $ids = array($c->dbId); $c = $c->getPageOrRoot(); foreach (Kwf_Component_Data_Root::getInstance()->getPageGenerators() as $gen) { foreach ...
php
private function _getIdsFromRecursiveEvent(Kwf_Component_Event_Component_RecursiveAbstract $event) { $c = $event->component->chained; $ids = array($c->dbId); $c = $c->getPageOrRoot(); foreach (Kwf_Component_Data_Root::getInstance()->getPageGenerators() as $gen) { foreach ...
[ "private", "function", "_getIdsFromRecursiveEvent", "(", "Kwf_Component_Event_Component_RecursiveAbstract", "$", "event", ")", "{", "$", "c", "=", "$", "event", "->", "component", "->", "chained", ";", "$", "ids", "=", "array", "(", "$", "c", "->", "dbId", ")"...
this method returns all child ids needed for deleting recursively
[ "this", "method", "returns", "all", "child", "ids", "needed", "for", "deleting", "recursively" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Basic/LinkTag/Intern/Trl/Events.php#L37-L48
koala-framework/koala-framework
Kwc/Box/MetaTags/Component.php
Kwc_Box_MetaTags_Component.getMetaTagsForData
public static function getMetaTagsForData($data) { $ret = array(); if (Kwf_Config::getValue('application.kwf.name') == 'Koala Framework') { $ret['generator'] = 'Koala Web Framework CMS'; } if ($data->getPage()) { if (Kwc_Abstract::getFlag($data->getPage()->com...
php
public static function getMetaTagsForData($data) { $ret = array(); if (Kwf_Config::getValue('application.kwf.name') == 'Koala Framework') { $ret['generator'] = 'Koala Web Framework CMS'; } if ($data->getPage()) { if (Kwc_Abstract::getFlag($data->getPage()->com...
[ "public", "static", "function", "getMetaTagsForData", "(", "$", "data", ")", "{", "$", "ret", "=", "array", "(", ")", ";", "if", "(", "Kwf_Config", "::", "getValue", "(", "'application.kwf.name'", ")", "==", "'Koala Framework'", ")", "{", "$", "ret", "[", ...
public for trl
[ "public", "for", "trl" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Box/MetaTags/Component.php#L23-L77
koala-framework/koala-framework
Kwc/Box/MetaTags/Component.php
Kwc_Box_MetaTags_Component.injectMeta
public static function injectMeta($html, $title) { $kwfUp = Kwf_Config::getValue('application.uniquePrefix') ? Kwf_Config::getValue('application.uniquePrefix').'-' : ''; $startPos = strpos($html, '<!-- '.$kwfUp.'metaTags -->'); $endPos = strpos($html, '<!-- /'.$kwfUp.'metaTags -->')+18+strle...
php
public static function injectMeta($html, $title) { $kwfUp = Kwf_Config::getValue('application.uniquePrefix') ? Kwf_Config::getValue('application.uniquePrefix').'-' : ''; $startPos = strpos($html, '<!-- '.$kwfUp.'metaTags -->'); $endPos = strpos($html, '<!-- /'.$kwfUp.'metaTags -->')+18+strle...
[ "public", "static", "function", "injectMeta", "(", "$", "html", ",", "$", "title", ")", "{", "$", "kwfUp", "=", "Kwf_Config", "::", "getValue", "(", "'application.uniquePrefix'", ")", "?", "Kwf_Config", "::", "getValue", "(", "'application.uniquePrefix'", ")", ...
public for trl
[ "public", "for", "trl" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Box/MetaTags/Component.php#L93-L102
koala-framework/koala-framework
Kwc/Form/Component.php
Kwc_Form_Component._handleProcessException
protected function _handleProcessException(Exception $e) { if ($e instanceof Kwf_Exception_Client) { $this->_errors[] = array( 'message' => $e->getMessage() ); } else { if (!$e instanceof Kwf_Exception) $e = new Kwf_Exception_Other($e); ...
php
protected function _handleProcessException(Exception $e) { if ($e instanceof Kwf_Exception_Client) { $this->_errors[] = array( 'message' => $e->getMessage() ); } else { if (!$e instanceof Kwf_Exception) $e = new Kwf_Exception_Other($e); ...
[ "protected", "function", "_handleProcessException", "(", "Exception", "$", "e", ")", "{", "if", "(", "$", "e", "instanceof", "Kwf_Exception_Client", ")", "{", "$", "this", "->", "_errors", "[", "]", "=", "array", "(", "'message'", "=>", "$", "e", "->", "...
can be overriden to *not* log specific exceptions or adapt error
[ "can", "be", "overriden", "to", "*", "not", "*", "log", "specific", "exceptions", "or", "adapt", "error" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Form/Component.php#L134-L147
koala-framework/koala-framework
Kwf/Loader.php
Kwf_Loader.setIncludePath
public static function setIncludePath($ip) { if (self::$_includePath) throw new Kwf_Exception("include path is already set"); self::$_includePath = $ip; set_include_path($ip); }
php
public static function setIncludePath($ip) { if (self::$_includePath) throw new Kwf_Exception("include path is already set"); self::$_includePath = $ip; set_include_path($ip); }
[ "public", "static", "function", "setIncludePath", "(", "$", "ip", ")", "{", "if", "(", "self", "::", "$", "_includePath", ")", "throw", "new", "Kwf_Exception", "(", "\"include path is already set\"", ")", ";", "self", "::", "$", "_includePath", "=", "$", "ip...
Set include path used for Kwf_Loader::isValidClass called exactly once in setup get_include_path is not used, because some external library might have changed that. @internal
[ "Set", "include", "path", "used", "for", "Kwf_Loader", "::", "isValidClass" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Loader.php#L14-L19
koala-framework/koala-framework
Kwf/Service/Amazon.php
Kwf_Service_Amazon.itemSearch
public function itemSearch(array $options) { Kwf_Benchmark::countBt('Service Amazon request', 'itemSearch'.print_r($options, true)); $client = $this->getRestClient(); $client->setUri($this->_baseUri); $defaultOptions = array('ResponseGroup' => 'Small'); $options = $this->_p...
php
public function itemSearch(array $options) { Kwf_Benchmark::countBt('Service Amazon request', 'itemSearch'.print_r($options, true)); $client = $this->getRestClient(); $client->setUri($this->_baseUri); $defaultOptions = array('ResponseGroup' => 'Small'); $options = $this->_p...
[ "public", "function", "itemSearch", "(", "array", "$", "options", ")", "{", "Kwf_Benchmark", "::", "countBt", "(", "'Service Amazon request'", ",", "'itemSearch'", ".", "print_r", "(", "$", "options", ",", "true", ")", ")", ";", "$", "client", "=", "$", "t...
Search for Items @param array $options Options to use for the Search Query @throws Zend_Service_Exception @return Kwf_Service_Amazon_ResultSet @see http://www.amazon.com/gp/aws/sdk/main.html/102-9041115-9057709?s=AWSEcommerceService&v=2011-08-01&p=ApiReference/ItemSearchOperation
[ "Search", "for", "Items" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Service/Amazon.php#L23-L48
koala-framework/koala-framework
Kwf/Service/Amazon.php
Kwf_Service_Amazon.itemLookup
public function itemLookup($asin, array $options = array()) { Kwf_Benchmark::count('Service Amazon request', 'itemLookup '.$asin); $client = $this->getRestClient(); $client->setUri($this->_baseUri); $client->getHttpClient()->resetParameters(); $defaultOptions = array('Respo...
php
public function itemLookup($asin, array $options = array()) { Kwf_Benchmark::count('Service Amazon request', 'itemLookup '.$asin); $client = $this->getRestClient(); $client->setUri($this->_baseUri); $client->getHttpClient()->resetParameters(); $defaultOptions = array('Respo...
[ "public", "function", "itemLookup", "(", "$", "asin", ",", "array", "$", "options", "=", "array", "(", ")", ")", "{", "Kwf_Benchmark", "::", "count", "(", "'Service Amazon request'", ",", "'itemLookup '", ".", "$", "asin", ")", ";", "$", "client", "=", "...
Look up item(s) by ASIN @param string $asin Amazon ASIN ID @param array $options Query Options @see http://www.amazon.com/gp/aws/sdk/main.html/102-9041115-9057709?s=AWSEcommerceService&v=2011-08-01&p=ApiReference/ItemLookupOperation @throws Zend_Service_Exception @return Kwf_Service_Amazon_Item|Kwf_Service_Amazo...
[ "Look", "up", "item", "(", "s", ")", "by", "ASIN" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Service/Amazon.php#L60-L94
koala-framework/koala-framework
Kwf/Service/Amazon.php
Kwf_Service_Amazon.browseNodeLookup
public function browseNodeLookup($nodeId, array $options = array()) { Kwf_Benchmark::count('Service Amazon request', 'browseNodeLookup'); $client = $this->getRestClient(); $client->setUri($this->_baseUri); $client->getHttpClient()->resetParameters(); $defaultOptions = array...
php
public function browseNodeLookup($nodeId, array $options = array()) { Kwf_Benchmark::count('Service Amazon request', 'browseNodeLookup'); $client = $this->getRestClient(); $client->setUri($this->_baseUri); $client->getHttpClient()->resetParameters(); $defaultOptions = array...
[ "public", "function", "browseNodeLookup", "(", "$", "nodeId", ",", "array", "$", "options", "=", "array", "(", ")", ")", "{", "Kwf_Benchmark", "::", "count", "(", "'Service Amazon request'", ",", "'browseNodeLookup'", ")", ";", "$", "client", "=", "$", "this...
Look up item(s) by ASIN @param string $asin Amazon ASIN ID @param array $options Query Options @see http://docs.amazonwebservices.com/AWSEcommerceService/2011-08-01/ApiReference/BrowseNodeLookupOperation.html @throws Zend_Service_Exception @return Kwf_Service_Amazon_BrowseNode
[ "Look", "up", "item", "(", "s", ")", "by", "ASIN" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Service/Amazon.php#L105-L130
koala-framework/koala-framework
Kwf/Benchmark.php
Kwf_Benchmark._getInstance
private static function _getInstance() { static $i; if (!isset($i)) { $c = Kwf_Config::getValue('benchmarkClass'); if (!class_exists($c)) { $c = 'Kwf_Benchmark'; } $i = new $c(); } return $i; }
php
private static function _getInstance() { static $i; if (!isset($i)) { $c = Kwf_Config::getValue('benchmarkClass'); if (!class_exists($c)) { $c = 'Kwf_Benchmark'; } $i = new $c(); } return $i; }
[ "private", "static", "function", "_getInstance", "(", ")", "{", "static", "$", "i", ";", "if", "(", "!", "isset", "(", "$", "i", ")", ")", "{", "$", "c", "=", "Kwf_Config", "::", "getValue", "(", "'benchmarkClass'", ")", ";", "if", "(", "!", "class...
wird von Kwf_Setup::setUp gesetzt
[ "wird", "von", "Kwf_Setup", "::", "setUp", "gesetzt" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Benchmark.php#L13-L24
koala-framework/koala-framework
Kwf/Benchmark.php
Kwf_Benchmark.start
public static function start($identifier = null, $addInfo = null) { if (!self::$_enabled) return null; return new Kwf_Benchmark_Profile($identifier, $addInfo); }
php
public static function start($identifier = null, $addInfo = null) { if (!self::$_enabled) return null; return new Kwf_Benchmark_Profile($identifier, $addInfo); }
[ "public", "static", "function", "start", "(", "$", "identifier", "=", "null", ",", "$", "addInfo", "=", "null", ")", "{", "if", "(", "!", "self", "::", "$", "_enabled", ")", "return", "null", ";", "return", "new", "Kwf_Benchmark_Profile", "(", "$", "id...
Startet eine Sequenz @param string $identifier
[ "Startet", "eine", "Sequenz" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Benchmark.php#L31-L35
koala-framework/koala-framework
Kwc/Articles/ReadRequired/Component.php
Kwc_Articles_ReadRequired_Component.getRedirectUrl
public function getRedirectUrl($postData) { $allowRedirect = !isset($postData['redirect']) || $postData['redirect'] == '/'; if ($allowRedirect) { $requiredArticles = $this->_getRequiredArticles(); if ($requiredArticles && $requiredArticles->count() > 0) { retu...
php
public function getRedirectUrl($postData) { $allowRedirect = !isset($postData['redirect']) || $postData['redirect'] == '/'; if ($allowRedirect) { $requiredArticles = $this->_getRequiredArticles(); if ($requiredArticles && $requiredArticles->count() > 0) { retu...
[ "public", "function", "getRedirectUrl", "(", "$", "postData", ")", "{", "$", "allowRedirect", "=", "!", "isset", "(", "$", "postData", "[", "'redirect'", "]", ")", "||", "$", "postData", "[", "'redirect'", "]", "==", "'/'", ";", "if", "(", "$", "allowR...
To be called in Kwc_User_Login_Component::_getUrlForRedirect()
[ "To", "be", "called", "in", "Kwc_User_Login_Component", "::", "_getUrlForRedirect", "()" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Articles/ReadRequired/Component.php#L58-L68
koala-framework/koala-framework
Kwc/Root/TrlRoot/Chained/Admin.php
Kwc_Root_TrlRoot_Chained_Admin.duplicated
public static function duplicated(Kwf_Component_Data $source, Kwf_Component_Data $new) { $chained = Kwf_Component_Data_Root::getInstance() ->getComponentsByClass('Kwc_Root_TrlRoot_Chained_Component', array('ignoreVisible'=>true)); //bySameClass wenn fkt nicht mehr static (todo oben erledigt) ...
php
public static function duplicated(Kwf_Component_Data $source, Kwf_Component_Data $new) { $chained = Kwf_Component_Data_Root::getInstance() ->getComponentsByClass('Kwc_Root_TrlRoot_Chained_Component', array('ignoreVisible'=>true)); //bySameClass wenn fkt nicht mehr static (todo oben erledigt) ...
[ "public", "static", "function", "duplicated", "(", "Kwf_Component_Data", "$", "source", ",", "Kwf_Component_Data", "$", "new", ")", "{", "$", "chained", "=", "Kwf_Component_Data_Root", "::", "getInstance", "(", ")", "->", "getComponentsByClass", "(", "'Kwc_Root_TrlR...
TODO sollte nicht mehr static sein wenn todo in Kwf_Util_Component::duplicate erledigt wurde
[ "TODO", "sollte", "nicht", "mehr", "static", "sein", "wenn", "todo", "in", "Kwf_Util_Component", "::", "duplicate", "erledigt", "wurde" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Root/TrlRoot/Chained/Admin.php#L5-L64
koala-framework/koala-framework
Kwc/Root/Category/GeneratorEvents.php
Kwc_Root_Category_GeneratorEvents.onRowUpdatesFinished
public function onRowUpdatesFinished(Kwf_Events_Event_Row_UpdatesFinished $event) { foreach ($this->_deferredDeleteChildPageIdsCache as $i) { $this->_deleteChildPageIdsCache($i); } $this->_deferredDeleteChildPageIdsCache = array(); }
php
public function onRowUpdatesFinished(Kwf_Events_Event_Row_UpdatesFinished $event) { foreach ($this->_deferredDeleteChildPageIdsCache as $i) { $this->_deleteChildPageIdsCache($i); } $this->_deferredDeleteChildPageIdsCache = array(); }
[ "public", "function", "onRowUpdatesFinished", "(", "Kwf_Events_Event_Row_UpdatesFinished", "$", "event", ")", "{", "foreach", "(", "$", "this", "->", "_deferredDeleteChildPageIdsCache", "as", "$", "i", ")", "{", "$", "this", "->", "_deleteChildPageIdsCache", "(", "$...
else the Generator would cache again with the *old* data as it's called from menu events
[ "else", "the", "Generator", "would", "cache", "again", "with", "the", "*", "old", "*", "data", "as", "it", "s", "called", "from", "menu", "events" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Root/Category/GeneratorEvents.php#L141-L147
koala-framework/koala-framework
Kwf/Component/Events/ProcessInputCache.php
Kwf_Component_Events_ProcessInputCache.onComponentAddedOrRemoved
public function onComponentAddedOrRemoved(Kwf_Component_Event_Component_Abstract $event) { $cacheId = 'procI-'.$event->component->getPageOrRoot()->componentId; Kwf_Cache_Simple::delete($cacheId); $log = Kwf_Events_Log::getInstance(); if ($log) { $log->log("processInput ca...
php
public function onComponentAddedOrRemoved(Kwf_Component_Event_Component_Abstract $event) { $cacheId = 'procI-'.$event->component->getPageOrRoot()->componentId; Kwf_Cache_Simple::delete($cacheId); $log = Kwf_Events_Log::getInstance(); if ($log) { $log->log("processInput ca...
[ "public", "function", "onComponentAddedOrRemoved", "(", "Kwf_Component_Event_Component_Abstract", "$", "event", ")", "{", "$", "cacheId", "=", "'procI-'", ".", "$", "event", "->", "component", "->", "getPageOrRoot", "(", ")", "->", "componentId", ";", "Kwf_Cache_Sim...
clear cache used in Kwf_Component_Abstract_ContentSender_Default
[ "clear", "cache", "used", "in", "Kwf_Component_Abstract_ContentSender_Default" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Component/Events/ProcessInputCache.php#L27-L35
koala-framework/koala-framework
Kwc/Chained/Trl/MasterAsChild/ContentSender.php
Kwc_Chained_Trl_MasterAsChild_ContentSender.sendContent
public function sendContent($includeMaster) { $data = $this->_data->getChildComponent('-child'); $contentSender = Kwc_Abstract::getSetting($data->componentClass, 'contentSender'); $contentSender = new $contentSender($data); $contentSender->sendContent($includeMaster); }
php
public function sendContent($includeMaster) { $data = $this->_data->getChildComponent('-child'); $contentSender = Kwc_Abstract::getSetting($data->componentClass, 'contentSender'); $contentSender = new $contentSender($data); $contentSender->sendContent($includeMaster); }
[ "public", "function", "sendContent", "(", "$", "includeMaster", ")", "{", "$", "data", "=", "$", "this", "->", "_data", "->", "getChildComponent", "(", "'-child'", ")", ";", "$", "contentSender", "=", "Kwc_Abstract", "::", "getSetting", "(", "$", "data", "...
und zwar ist die page nicht die für die sendContent() aufgerufen wird sondern die child, und da fehlen dann die boxen und alles
[ "und", "zwar", "ist", "die", "page", "nicht", "die", "für", "die", "sendContent", "()", "aufgerufen", "wird", "sondern", "die", "child", "und", "da", "fehlen", "dann", "die", "boxen", "und", "alles" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Chained/Trl/MasterAsChild/ContentSender.php#L7-L13
koala-framework/koala-framework
Kwc/Basic/LinkTag/News/Admin.php
Kwc_Basic_LinkTag_News_Admin.afterDuplicate
public function afterDuplicate($rootSource, $rootTarget) { parent::afterDuplicate($rootSource, $rootTarget); $prefix = $this->_prefix; $column = "{$prefix}_id"; foreach ($this->_duplicated as $d) { //modify duplicated links so they point to duplicated page //o...
php
public function afterDuplicate($rootSource, $rootTarget) { parent::afterDuplicate($rootSource, $rootTarget); $prefix = $this->_prefix; $column = "{$prefix}_id"; foreach ($this->_duplicated as $d) { //modify duplicated links so they point to duplicated page //o...
[ "public", "function", "afterDuplicate", "(", "$", "rootSource", ",", "$", "rootTarget", ")", "{", "parent", "::", "afterDuplicate", "(", "$", "rootSource", ",", "$", "rootTarget", ")", ";", "$", "prefix", "=", "$", "this", "->", "_prefix", ";", "$", "col...
TODO: reuse code from Link_Intern, but for that we have to inherit Link_Intern_Admin which we don't atm
[ "TODO", ":", "reuse", "code", "from", "Link_Intern", "but", "for", "that", "we", "have", "to", "inherit", "Link_Intern_Admin", "which", "we", "don", "t", "atm" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Basic/LinkTag/News/Admin.php#L82-L118
koala-framework/koala-framework
Kwc/Shop/Cart/Order.php
Kwc_Shop_Cart_Order.getProductText
public final function getProductText($orderProduct) { $data = Kwc_Shop_VoucherProduct_AddToCart_OrderProductData::getInstance($orderProduct->add_component_class); return $data->getProductText($orderProduct); }
php
public final function getProductText($orderProduct) { $data = Kwc_Shop_VoucherProduct_AddToCart_OrderProductData::getInstance($orderProduct->add_component_class); return $data->getProductText($orderProduct); }
[ "public", "final", "function", "getProductText", "(", "$", "orderProduct", ")", "{", "$", "data", "=", "Kwc_Shop_VoucherProduct_AddToCart_OrderProductData", "::", "getInstance", "(", "$", "orderProduct", "->", "add_component_class", ")", ";", "return", "$", "data", ...
override in addToCart
[ "override", "in", "addToCart" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Shop/Cart/Order.php#L72-L76
koala-framework/koala-framework
Kwc/Shop/Cart/Order.php
Kwc_Shop_Cart_Order._getProductPrice
protected function _getProductPrice($orderProduct) { $data = Kwc_Shop_VoucherProduct_AddToCart_OrderProductData::getInstance($orderProduct->add_component_class); return $data->getPrice($orderProduct); }
php
protected function _getProductPrice($orderProduct) { $data = Kwc_Shop_VoucherProduct_AddToCart_OrderProductData::getInstance($orderProduct->add_component_class); return $data->getPrice($orderProduct); }
[ "protected", "function", "_getProductPrice", "(", "$", "orderProduct", ")", "{", "$", "data", "=", "Kwc_Shop_VoucherProduct_AddToCart_OrderProductData", "::", "getInstance", "(", "$", "orderProduct", "->", "add_component_class", ")", ";", "return", "$", "data", "->", ...
override to implement eg. excl. vat prices for the whole order
[ "override", "to", "implement", "eg", ".", "excl", ".", "vat", "prices", "for", "the", "whole", "order" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Shop/Cart/Order.php#L85-L89
koala-framework/koala-framework
Kwc/Shop/Cart/Order.php
Kwc_Shop_Cart_Order._getProductsData
private function _getProductsData(Kwf_Component_Data $subroot = null) { $ret = array(); $items = $this->getChildRows('Products'); $ret = array(); foreach ($items as $i) { $data = Kwc_Shop_VoucherProduct_AddToCart_OrderProductData::getInstance($i->add_component_class); ...
php
private function _getProductsData(Kwf_Component_Data $subroot = null) { $ret = array(); $items = $this->getChildRows('Products'); $ret = array(); foreach ($items as $i) { $data = Kwc_Shop_VoucherProduct_AddToCart_OrderProductData::getInstance($i->add_component_class); ...
[ "private", "function", "_getProductsData", "(", "Kwf_Component_Data", "$", "subroot", "=", "null", ")", "{", "$", "ret", "=", "array", "(", ")", ";", "$", "items", "=", "$", "this", "->", "getChildRows", "(", "'Products'", ")", ";", "$", "ret", "=", "a...
if product is not available in sitetree anymore it is deleted (also called by Kwc_Shop_Cart_Component)
[ "if", "product", "is", "not", "available", "in", "sitetree", "anymore", "it", "is", "deleted", "(", "also", "called", "by", "Kwc_Shop_Cart_Component", ")" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Shop/Cart/Order.php#L165-L197
koala-framework/koala-framework
Kwc/Shop/Cart/Order.php
Kwc_Shop_Cart_Order._getAdditionalSumRows
protected function _getAdditionalSumRows($total) { $ret = array(); $payments = Kwc_Abstract::getChildComponentClasses( Kwc_Abstract::getChildComponentClass($this->getModel()->getCartComponentClass(), 'checkout'), 'payment'); if (isset($payments[$this->payment])) { $ro...
php
protected function _getAdditionalSumRows($total) { $ret = array(); $payments = Kwc_Abstract::getChildComponentClasses( Kwc_Abstract::getChildComponentClass($this->getModel()->getCartComponentClass(), 'checkout'), 'payment'); if (isset($payments[$this->payment])) { $ro...
[ "protected", "function", "_getAdditionalSumRows", "(", "$", "total", ")", "{", "$", "ret", "=", "array", "(", ")", ";", "$", "payments", "=", "Kwc_Abstract", "::", "getChildComponentClasses", "(", "Kwc_Abstract", "::", "getChildComponentClass", "(", "$", "this",...
kann überschrieben werden um zeilen für alle payments zu ändern
[ "kann", "überschrieben", "werden", "um", "zeilen", "für", "alle", "payments", "zu", "ändern" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Shop/Cart/Order.php#L214-L232
koala-framework/koala-framework
Kwc/Advanced/Sitemap/Component.php
Kwc_Advanced_Sitemap_Component.getListHtml
public static function getListHtml(Kwf_Component_Renderer_Abstract $renderer, Kwf_Component_Data $c, $level, $levels, $className) { $ret = ''; $level++; $select = new Kwf_Component_Select(); $select->whereShowInMenu(true); $ret .= '<ul class="' . self::getBemClass($className,...
php
public static function getListHtml(Kwf_Component_Renderer_Abstract $renderer, Kwf_Component_Data $c, $level, $levels, $className) { $ret = ''; $level++; $select = new Kwf_Component_Select(); $select->whereShowInMenu(true); $ret .= '<ul class="' . self::getBemClass($className,...
[ "public", "static", "function", "getListHtml", "(", "Kwf_Component_Renderer_Abstract", "$", "renderer", ",", "Kwf_Component_Data", "$", "c", ",", "$", "level", ",", "$", "levels", ",", "$", "className", ")", "{", "$", "ret", "=", "''", ";", "$", "level", "...
public because for trl
[ "public", "because", "for", "trl" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Advanced/Sitemap/Component.php#L30-L62
koala-framework/koala-framework
Kwc/Basic/Text/Row.php
Kwc_Basic_Text_Row.getContentParts
public function getContentParts($content = null, $ignoreLinksWithClass = null) { $classes = $this->_classes; $usedChildComponentNrs = array(); $componentId = $this->component_id; if (is_null($content)) $content = $this->content; $ret = array(); ...
php
public function getContentParts($content = null, $ignoreLinksWithClass = null) { $classes = $this->_classes; $usedChildComponentNrs = array(); $componentId = $this->component_id; if (is_null($content)) $content = $this->content; $ret = array(); ...
[ "public", "function", "getContentParts", "(", "$", "content", "=", "null", ",", "$", "ignoreLinksWithClass", "=", "null", ")", "{", "$", "classes", "=", "$", "this", "->", "_classes", ";", "$", "usedChildComponentNrs", "=", "array", "(", ")", ";", "$", "...
für Component und Row
[ "für", "Component", "und", "Row" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Basic/Text/Row.php#L15-L120
koala-framework/koala-framework
Kwc/Basic/Text/Row.php
Kwc_Basic_Text_Row._beforeSave
protected function _beforeSave() { $classes = $this->_classes; $this->content = $this->tidy($this->content); $newParts = $this->getContentParts($this->content); $newPartStrings = array(); foreach ($newParts as $part) { if (!is_string($part) ) { $n...
php
protected function _beforeSave() { $classes = $this->_classes; $this->content = $this->tidy($this->content); $newParts = $this->getContentParts($this->content); $newPartStrings = array(); foreach ($newParts as $part) { if (!is_string($part) ) { $n...
[ "protected", "function", "_beforeSave", "(", ")", "{", "$", "classes", "=", "$", "this", "->", "_classes", ";", "$", "this", "->", "content", "=", "$", "this", "->", "tidy", "(", "$", "this", "->", "content", ")", ";", "$", "newParts", "=", "$", "t...
childComponents löschen die aus dem html-code entfernt wurden
[ "childComponents", "löschen", "die", "aus", "dem", "html", "-", "code", "entfernt", "wurden" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Basic/Text/Row.php#L145-L184
koala-framework/koala-framework
Kwc/Basic/Text/Row.php
Kwc_Basic_Text_Row.addChildComponentRow
public function addChildComponentRow($type, $childComponentRow = null) { $r = $this->createChildRow('ChildComponents'); $r->component = $type; $r->nr = $this->getMaxChildComponentNr($type)+1; $r->saved = 0; $r->save(); if ($childComponentRow) { $childComp...
php
public function addChildComponentRow($type, $childComponentRow = null) { $r = $this->createChildRow('ChildComponents'); $r->component = $type; $r->nr = $this->getMaxChildComponentNr($type)+1; $r->saved = 0; $r->save(); if ($childComponentRow) { $childComp...
[ "public", "function", "addChildComponentRow", "(", "$", "type", ",", "$", "childComponentRow", "=", "null", ")", "{", "$", "r", "=", "$", "this", "->", "createChildRow", "(", "'ChildComponents'", ")", ";", "$", "r", "->", "component", "=", "$", "type", "...
im Controller + in der row
[ "im", "Controller", "+", "in", "der", "row" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Basic/Text/Row.php#L467-L479
koala-framework/koala-framework
Kwf/Controller/Action.php
Kwf_Controller_Action.dispatch
public function dispatch($action) { // Notify helpers of action preDispatch state $this->_helper->notifyPreDispatch(); $this->preDispatch(); Kwf_Benchmark::checkpoint('Action::preDispatch'); if ($this->getRequest()->isDispatched()) { if (null === $this->_classMet...
php
public function dispatch($action) { // Notify helpers of action preDispatch state $this->_helper->notifyPreDispatch(); $this->preDispatch(); Kwf_Benchmark::checkpoint('Action::preDispatch'); if ($this->getRequest()->isDispatched()) { if (null === $this->_classMet...
[ "public", "function", "dispatch", "(", "$", "action", ")", "{", "// Notify helpers of action preDispatch state", "$", "this", "->", "_helper", "->", "notifyPreDispatch", "(", ")", ";", "$", "this", "->", "preDispatch", "(", ")", ";", "Kwf_Benchmark", "::", "chec...
copied from zend to insert benchmark checkpoints
[ "copied", "from", "zend", "to", "insert", "benchmark", "checkpoints" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Controller/Action.php#L16-L47
koala-framework/koala-framework
Kwf/Util/MemoryLimit.php
Kwf_Util_MemoryLimit.set
public static function set($limit) { if (!is_int($limit)) throw new Kwf_Exception('Limit must be an integer'); if ($limit <= 0) throw new Kwf_Exception('Not allowed setting memory limit to: ' . $limit); $currentLimit = self::convertToMegabyte(ini_get('memory_limit')); if ($limit < (...
php
public static function set($limit) { if (!is_int($limit)) throw new Kwf_Exception('Limit must be an integer'); if ($limit <= 0) throw new Kwf_Exception('Not allowed setting memory limit to: ' . $limit); $currentLimit = self::convertToMegabyte(ini_get('memory_limit')); if ($limit < (...
[ "public", "static", "function", "set", "(", "$", "limit", ")", "{", "if", "(", "!", "is_int", "(", "$", "limit", ")", ")", "throw", "new", "Kwf_Exception", "(", "'Limit must be an integer'", ")", ";", "if", "(", "$", "limit", "<=", "0", ")", "throw", ...
Sets the memory limit in megabytes Does not lower the limit. Considers maximum value constrained by suhosin. @param int limit in Megabytes @return bool Whether setting limit was successful
[ "Sets", "the", "memory", "limit", "in", "megabytes" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/MemoryLimit.php#L14-L30
koala-framework/koala-framework
Kwf/Component/Abstract/ContentSender/Abstract.php
Kwf_Component_Abstract_ContentSender_Abstract.__getProcessInputComponents
public static function __getProcessInputComponents($data) { $showInvisible = Kwf_Component_Data_Root::getShowInvisible(); $cacheId = 'procI-'.$data->componentId; $success = false; if (!$showInvisible) { //don't cache in preview $cacheContents = Kwf_Cache_Simple::fetch($c...
php
public static function __getProcessInputComponents($data) { $showInvisible = Kwf_Component_Data_Root::getShowInvisible(); $cacheId = 'procI-'.$data->componentId; $success = false; if (!$showInvisible) { //don't cache in preview $cacheContents = Kwf_Cache_Simple::fetch($c...
[ "public", "static", "function", "__getProcessInputComponents", "(", "$", "data", ")", "{", "$", "showInvisible", "=", "Kwf_Component_Data_Root", "::", "getShowInvisible", "(", ")", ";", "$", "cacheId", "=", "'procI-'", ".", "$", "data", "->", "componentId", ";",...
public for unittest
[ "public", "for", "unittest" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Component/Abstract/ContentSender/Abstract.php#L41-L104
koala-framework/koala-framework
Kwf/Util/Https.php
Kwf_Util_Https.domainSupportsHttps
public static function domainSupportsHttps($domain) { if (Kwf_Config::getValue('server.https') === true) { if ($domains = Kwf_Config::getValueArray('server.httpsDomains')) { if ($domains && !in_array($domain, $domains)) { foreach ($domains as $d) { ...
php
public static function domainSupportsHttps($domain) { if (Kwf_Config::getValue('server.https') === true) { if ($domains = Kwf_Config::getValueArray('server.httpsDomains')) { if ($domains && !in_array($domain, $domains)) { foreach ($domains as $d) { ...
[ "public", "static", "function", "domainSupportsHttps", "(", "$", "domain", ")", "{", "if", "(", "Kwf_Config", "::", "getValue", "(", "'server.https'", ")", "===", "true", ")", "{", "if", "(", "$", "domains", "=", "Kwf_Config", "::", "getValueArray", "(", "...
Returns if the current request would support https and ensureHttps() would redirect to https
[ "Returns", "if", "the", "current", "request", "would", "support", "https", "and", "ensureHttps", "()", "would", "redirect", "to", "https" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/Https.php#L15-L33
koala-framework/koala-framework
Kwf/Form/Field/ComboBoxFilter.php
Kwf_Form_Field_ComboBoxFilter.getMetaData
public function getMetaData($model) { $ret = parent::getMetaData($model); $saveCombo = $this->getFilteredCombo(); $saveMetaData = $saveCombo->getMetaData($model); $filterMetaData = $ret; $filterMetaData['xtype'] = 'combobox'; if (!$saveCombo->getFilterField()) { ...
php
public function getMetaData($model) { $ret = parent::getMetaData($model); $saveCombo = $this->getFilteredCombo(); $saveMetaData = $saveCombo->getMetaData($model); $filterMetaData = $ret; $filterMetaData['xtype'] = 'combobox'; if (!$saveCombo->getFilterField()) { ...
[ "public", "function", "getMetaData", "(", "$", "model", ")", "{", "$", "ret", "=", "parent", "::", "getMetaData", "(", "$", "model", ")", ";", "$", "saveCombo", "=", "$", "this", "->", "getFilteredCombo", "(", ")", ";", "$", "saveMetaData", "=", "$", ...
setFilteredCombo(combo)
[ "setFilteredCombo", "(", "combo", ")" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Form/Field/ComboBoxFilter.php#L21-L53
koala-framework/koala-framework
Kwf/Util/ProgressBar/Adapter/Cache.php
Kwf_Util_ProgressBar_Adapter_Cache.notify
public function notify($current, $max, $percent, $timeTaken, $timeRemaining, $text) { //lastWrittenPercent and lastWrittenTime are used to prevent performance issues if //many progresses are written. (the filesystem access at nfs can slow that down) //we just update the progressbar if the pe...
php
public function notify($current, $max, $percent, $timeTaken, $timeRemaining, $text) { //lastWrittenPercent and lastWrittenTime are used to prevent performance issues if //many progresses are written. (the filesystem access at nfs can slow that down) //we just update the progressbar if the pe...
[ "public", "function", "notify", "(", "$", "current", ",", "$", "max", ",", "$", "percent", ",", "$", "timeTaken", ",", "$", "timeRemaining", ",", "$", "text", ")", "{", "//lastWrittenPercent and lastWrittenTime are used to prevent performance issues if", "//many progr...
the following methods must be overwritten
[ "the", "following", "methods", "must", "be", "overwritten" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/ProgressBar/Adapter/Cache.php#L60-L87
koala-framework/koala-framework
Kwf/Rest/Controller/Model.php
Kwf_Rest_Controller_Model.indexAction
public function indexAction() { $this->view->data = array(); $s = $this->_getSelectIndex(); if ($this->_loadColumns) { foreach ($this->_loadColumns as $c) { $s->expr($c); } } foreach ($this->_model->getRows($s) as $row) { $t...
php
public function indexAction() { $this->view->data = array(); $s = $this->_getSelectIndex(); if ($this->_loadColumns) { foreach ($this->_loadColumns as $c) { $s->expr($c); } } foreach ($this->_model->getRows($s) as $row) { $t...
[ "public", "function", "indexAction", "(", ")", "{", "$", "this", "->", "view", "->", "data", "=", "array", "(", ")", ";", "$", "s", "=", "$", "this", "->", "_getSelectIndex", "(", ")", ";", "if", "(", "$", "this", "->", "_loadColumns", ")", "{", ...
Handle GET and return a list of resources
[ "Handle", "GET", "and", "return", "a", "list", "of", "resources" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Rest/Controller/Model.php#L174-L187
koala-framework/koala-framework
Kwf/Rest/Controller/Model.php
Kwf_Rest_Controller_Model.getAction
public function getAction() { $s = $this->_getSelect(); if ($this->_loadColumns) { foreach ($this->_loadColumns as $c) { $s->expr($c); } } $s->whereId($this->_getParam('id')); $row = $this->_model->getRow($s); if (!$row) throw n...
php
public function getAction() { $s = $this->_getSelect(); if ($this->_loadColumns) { foreach ($this->_loadColumns as $c) { $s->expr($c); } } $s->whereId($this->_getParam('id')); $row = $this->_model->getRow($s); if (!$row) throw n...
[ "public", "function", "getAction", "(", ")", "{", "$", "s", "=", "$", "this", "->", "_getSelect", "(", ")", ";", "if", "(", "$", "this", "->", "_loadColumns", ")", "{", "foreach", "(", "$", "this", "->", "_loadColumns", "as", "$", "c", ")", "{", ...
Handle GET and return a specific resource item
[ "Handle", "GET", "and", "return", "a", "specific", "resource", "item" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Rest/Controller/Model.php#L190-L202
koala-framework/koala-framework
Kwf/Rest/Controller/Model.php
Kwf_Rest_Controller_Model.postAction
public function postAction() { $data = json_decode($this->getRequest()->getRawBody()); if (!is_array($data)) $data = array($data); $ret = array(); foreach ($data as $d) { $row = $this->_model->createRow(); if (isset($d->id) && $d->id) { $row->...
php
public function postAction() { $data = json_decode($this->getRequest()->getRawBody()); if (!is_array($data)) $data = array($data); $ret = array(); foreach ($data as $d) { $row = $this->_model->createRow(); if (isset($d->id) && $d->id) { $row->...
[ "public", "function", "postAction", "(", ")", "{", "$", "data", "=", "json_decode", "(", "$", "this", "->", "getRequest", "(", ")", "->", "getRawBody", "(", ")", ")", ";", "if", "(", "!", "is_array", "(", "$", "data", ")", ")", "$", "data", "=", ...
Handle POST requests to create a new resource item
[ "Handle", "POST", "requests", "to", "create", "a", "new", "resource", "item" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Rest/Controller/Model.php#L205-L231
koala-framework/koala-framework
Kwf/Rest/Controller/Model.php
Kwf_Rest_Controller_Model.putAction
public function putAction() { $data = json_decode($this->getRequest()->getRawBody()); if (!is_array($data)) $data = array($data); $ret = array(); foreach ($data as $d) { $s = $this->_getSelect(); $s->whereId($d->id); $row = $this->_model->getRow($...
php
public function putAction() { $data = json_decode($this->getRequest()->getRawBody()); if (!is_array($data)) $data = array($data); $ret = array(); foreach ($data as $d) { $s = $this->_getSelect(); $s->whereId($d->id); $row = $this->_model->getRow($...
[ "public", "function", "putAction", "(", ")", "{", "$", "data", "=", "json_decode", "(", "$", "this", "->", "getRequest", "(", ")", "->", "getRawBody", "(", ")", ")", ";", "if", "(", "!", "is_array", "(", "$", "data", ")", ")", "$", "data", "=", "...
Handle PUT requests to update a specific resource item
[ "Handle", "PUT", "requests", "to", "update", "a", "specific", "resource", "item" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Rest/Controller/Model.php#L255-L281
koala-framework/koala-framework
Kwf/Rest/Controller/Model.php
Kwf_Rest_Controller_Model.deleteAction
public function deleteAction() { $s = $this->_getSelect(); $s->whereId($this->_getParam('id')); $row = $this->_model->getRow($s); if (!$row) throw new Kwf_Exception_NotFound(); $this->_beforeDelete($row); $row->delete(); }
php
public function deleteAction() { $s = $this->_getSelect(); $s->whereId($this->_getParam('id')); $row = $this->_model->getRow($s); if (!$row) throw new Kwf_Exception_NotFound(); $this->_beforeDelete($row); $row->delete(); }
[ "public", "function", "deleteAction", "(", ")", "{", "$", "s", "=", "$", "this", "->", "_getSelect", "(", ")", ";", "$", "s", "->", "whereId", "(", "$", "this", "->", "_getParam", "(", "'id'", ")", ")", ";", "$", "row", "=", "$", "this", "->", ...
Handle DELETE requests to delete a specific item
[ "Handle", "DELETE", "requests", "to", "delete", "a", "specific", "item" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Rest/Controller/Model.php#L284-L292
koala-framework/koala-framework
Kwc/Shop/AddToCartAbstract/OrderProductData.php
Kwc_Shop_AddToCartAbstract_OrderProductData.getAddComponentByDbId
public static function getAddComponentByDbId($dbId, $subroot) { $ret = null; $addComponents = Kwf_Component_Data_Root::getInstance()->getComponentsByDbId($dbId); if (count($addComponents) > 1) { foreach ($addComponents as $addComponent) { if ($addComponent->getSu...
php
public static function getAddComponentByDbId($dbId, $subroot) { $ret = null; $addComponents = Kwf_Component_Data_Root::getInstance()->getComponentsByDbId($dbId); if (count($addComponents) > 1) { foreach ($addComponents as $addComponent) { if ($addComponent->getSu...
[ "public", "static", "function", "getAddComponentByDbId", "(", "$", "dbId", ",", "$", "subroot", ")", "{", "$", "ret", "=", "null", ";", "$", "addComponents", "=", "Kwf_Component_Data_Root", "::", "getInstance", "(", ")", "->", "getComponentsByDbId", "(", "$", ...
This method is needed to support: multiple domain web where domains share products (getComponentsByDbId returns multiple, correct one is selected based on $subroot) trl web where translated version of product has own db_id but lives in a different subroot (the $subroot won't be used in that case)
[ "This", "method", "is", "needed", "to", "support", ":" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Shop/AddToCartAbstract/OrderProductData.php#L47-L64
koala-framework/koala-framework
Kwc/Directories/List/Component.php
Kwc_Directories_List_Component._getParentItemDirectoryClasses
protected static function _getParentItemDirectoryClasses($componentClass, $steps = null) { $ret = array(); foreach (Kwc_Abstract::getComponentClasses() as $class) { foreach (Kwc_Abstract::getChildComponentClasses($class) as $childClass) { if ($childClass == $componentClas...
php
protected static function _getParentItemDirectoryClasses($componentClass, $steps = null) { $ret = array(); foreach (Kwc_Abstract::getComponentClasses() as $class) { foreach (Kwc_Abstract::getChildComponentClasses($class) as $childClass) { if ($childClass == $componentClas...
[ "protected", "static", "function", "_getParentItemDirectoryClasses", "(", "$", "componentClass", ",", "$", "steps", "=", "null", ")", "{", "$", "ret", "=", "array", "(", ")", ";", "foreach", "(", "Kwc_Abstract", "::", "getComponentClasses", "(", ")", "as", "...
abstract public static function getItemDirectoryClasses($componentClass);
[ "abstract", "public", "static", "function", "getItemDirectoryClasses", "(", "$componentClass", ")", ";" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Directories/List/Component.php#L58-L80
koala-framework/koala-framework
Kwc/Favourites/Component.php
Kwc_Favourites_Component.getFavouriteComponentIds
public static function getFavouriteComponentIds($favouritesModel) { $ret = array(); $userId = Kwf_Registry::get('userModel')->getAuthedUserId(); if ($userId) { $cacheIdUser = 'favCIds'.$userId; $ret = Kwf_Cache_Simple::fetch($cacheIdUser, $success); if (!$...
php
public static function getFavouriteComponentIds($favouritesModel) { $ret = array(); $userId = Kwf_Registry::get('userModel')->getAuthedUserId(); if ($userId) { $cacheIdUser = 'favCIds'.$userId; $ret = Kwf_Cache_Simple::fetch($cacheIdUser, $success); if (!$...
[ "public", "static", "function", "getFavouriteComponentIds", "(", "$", "favouritesModel", ")", "{", "$", "ret", "=", "array", "(", ")", ";", "$", "userId", "=", "Kwf_Registry", "::", "get", "(", "'userModel'", ")", "->", "getAuthedUserId", "(", ")", ";", "i...
returns a list of all visible favourite componentIds
[ "returns", "a", "list", "of", "all", "visible", "favourite", "componentIds" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Favourites/Component.php#L39-L68
koala-framework/koala-framework
Kwf/Util/Update/Helper.php
Kwf_Util_Update_Helper.getUpdateTags
public static function getUpdateTags() { if (!isset(self::$_updateTagsCache)) { self::$_updateTagsCache = Kwf_Registry::get('config')->server->updateTags->toArray(); foreach (Kwf_Component_Abstract::getComponentClasses() as $class) { if (Kwc_Abstract::hasSetting($clas...
php
public static function getUpdateTags() { if (!isset(self::$_updateTagsCache)) { self::$_updateTagsCache = Kwf_Registry::get('config')->server->updateTags->toArray(); foreach (Kwf_Component_Abstract::getComponentClasses() as $class) { if (Kwc_Abstract::hasSetting($clas...
[ "public", "static", "function", "getUpdateTags", "(", ")", "{", "if", "(", "!", "isset", "(", "self", "::", "$", "_updateTagsCache", ")", ")", "{", "self", "::", "$", "_updateTagsCache", "=", "Kwf_Registry", "::", "get", "(", "'config'", ")", "->", "serv...
Returns all udpate tags used by this webs. They are usually set in config.ini
[ "Returns", "all", "udpate", "tags", "used", "by", "this", "webs", ".", "They", "are", "usually", "set", "in", "config", ".", "ini" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/Update/Helper.php#L19-L30
koala-framework/koala-framework
Kwc/Directories/Item/Detail/AssignedCategories/Component.php
Kwc_Directories_Item_Detail_AssignedCategories_Component.getSelect
public function getSelect() { $ret = parent::getSelect(); $categoryDirectory = $this->getItemDirectory()->getComponent(); $refData = Kwc_Directories_Category_Detail_List_Component::getTableReferenceData( Kwc_Abstract::getSetting(get_class($categoryDirectory), 'categoryToItemMode...
php
public function getSelect() { $ret = parent::getSelect(); $categoryDirectory = $this->getItemDirectory()->getComponent(); $refData = Kwc_Directories_Category_Detail_List_Component::getTableReferenceData( Kwc_Abstract::getSetting(get_class($categoryDirectory), 'categoryToItemMode...
[ "public", "function", "getSelect", "(", ")", "{", "$", "ret", "=", "parent", "::", "getSelect", "(", ")", ";", "$", "categoryDirectory", "=", "$", "this", "->", "getItemDirectory", "(", ")", "->", "getComponent", "(", ")", ";", "$", "refData", "=", "Kw...
/* public function getCacheVars() { return $this->getData()->getChildComponent('-view')->getComponent()->getCacheVars(); }
[ "/", "*", "public", "function", "getCacheVars", "()", "{", "return", "$this", "-", ">", "getData", "()", "-", ">", "getChildComponent", "(", "-", "view", ")", "-", ">", "getComponent", "()", "-", ">", "getCacheVars", "()", ";", "}" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Directories/Item/Detail/AssignedCategories/Component.php#L43-L69
koala-framework/koala-framework
Kwc/Basic/LinkTag/Intern/Trl/DataAbstract.php
Kwc_Basic_LinkTag_Intern_Trl_DataAbstract.getLinkedData
public final function getLinkedData() { if (!isset($this->_data)) { $masterLinkData = $this->chained->getLinkedData(array('ignoreVisible'=>true)); if (!$masterLinkData) $this->_data = false; if ($masterLinkData) { if (is_null($this->_type)) throw new Kwf_...
php
public final function getLinkedData() { if (!isset($this->_data)) { $masterLinkData = $this->chained->getLinkedData(array('ignoreVisible'=>true)); if (!$masterLinkData) $this->_data = false; if ($masterLinkData) { if (is_null($this->_type)) throw new Kwf_...
[ "public", "final", "function", "getLinkedData", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "_data", ")", ")", "{", "$", "masterLinkData", "=", "$", "this", "->", "chained", "->", "getLinkedData", "(", "array", "(", "'ignoreVisible'",...
'cc' oder 'trl'
[ "cc", "oder", "trl" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Basic/LinkTag/Intern/Trl/DataAbstract.php#L8-L36
koala-framework/koala-framework
Kwf/Trl.php
Kwf_Trl._findElementPlural
protected function _findElementPlural($needle, $plural, $source, $context = '', $language = null) { if ($language) $target = $language; else $target = $this->getTargetLanguage(); $cacheId = 'trlp-'.$source.'-'.$target.'-'.$plural.'-'.$context; $ret = Kwf_Cache_SimpleStatic::fetch($c...
php
protected function _findElementPlural($needle, $plural, $source, $context = '', $language = null) { if ($language) $target = $language; else $target = $this->getTargetLanguage(); $cacheId = 'trlp-'.$source.'-'.$target.'-'.$plural.'-'.$context; $ret = Kwf_Cache_SimpleStatic::fetch($c...
[ "protected", "function", "_findElementPlural", "(", "$", "needle", ",", "$", "plural", ",", "$", "source", ",", "$", "context", "=", "''", ",", "$", "language", "=", "null", ")", "{", "if", "(", "$", "language", ")", "$", "target", "=", "$", "languag...
TODO: wofuer wird der $needle parameter verwendet?!
[ "TODO", ":", "wofuer", "wird", "der", "$needle", "parameter", "verwendet?!" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Trl.php#L434-L455
koala-framework/koala-framework
Kwf/Util/SimpleHttpProxy.php
Kwf_Util_SimpleHttpProxy.dispatch
public static function dispatch($hostnames) { if (Kwf_Setup::getRequestPath()===false) return; if (!preg_match('#^/kwf/proxy/?$#i', Kwf_Setup::getRequestPath())) return; if (is_string($hostnames)) { $hostnames = array($hostnames); } $proxyUrl = $_REQUEST['proxy...
php
public static function dispatch($hostnames) { if (Kwf_Setup::getRequestPath()===false) return; if (!preg_match('#^/kwf/proxy/?$#i', Kwf_Setup::getRequestPath())) return; if (is_string($hostnames)) { $hostnames = array($hostnames); } $proxyUrl = $_REQUEST['proxy...
[ "public", "static", "function", "dispatch", "(", "$", "hostnames", ")", "{", "if", "(", "Kwf_Setup", "::", "getRequestPath", "(", ")", "===", "false", ")", "return", ";", "if", "(", "!", "preg_match", "(", "'#^/kwf/proxy/?$#i'", ",", "Kwf_Setup", "::", "ge...
Proxy, der zB für cross-domain ajax requests verwendet werden kann @param string|array $hosts Erlaubte Hostnamen (RegExp erlaubt, ^ vorne und $ hinten werden autom. angefügt)
[ "Proxy", "der", "zB", "für", "cross", "-", "domain", "ajax", "requests", "verwendet", "werden", "kann" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/SimpleHttpProxy.php#L9-L52
koala-framework/koala-framework
Kwc/Mail/Redirect/Component.php
Kwc_Mail_Redirect_Component._getRedirectUrl
protected function _getRedirectUrl() { $r = $this->_getRedirectRow(); if (isset($r->type) && $r->type && $r->type != 'redirect') { throw new Kwf_Exception_NotFound('Invalid type'); } return $r->value; }
php
protected function _getRedirectUrl() { $r = $this->_getRedirectRow(); if (isset($r->type) && $r->type && $r->type != 'redirect') { throw new Kwf_Exception_NotFound('Invalid type'); } return $r->value; }
[ "protected", "function", "_getRedirectUrl", "(", ")", "{", "$", "r", "=", "$", "this", "->", "_getRedirectRow", "(", ")", ";", "if", "(", "isset", "(", "$", "r", "->", "type", ")", "&&", "$", "r", "->", "type", "&&", "$", "r", "->", "type", "!=",...
can be overridden to customize redirect url
[ "can", "be", "overridden", "to", "customize", "redirect", "url" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Mail/Redirect/Component.php#L48-L57
koala-framework/koala-framework
Kwc/Mail/Redirect/Component.php
Kwc_Mail_Redirect_Component._createRedirectUrl
public function _createRedirectUrl($href, $recipient) { $recipientPrimary = $recipient->getModel()->getPrimaryKey(); $recipientSource = $this->getRecipientModelShortcut(get_class($recipient->getModel())); $m = $this->getChildModel(); if (substr($href, 0, 1) == '#') return $href; ...
php
public function _createRedirectUrl($href, $recipient) { $recipientPrimary = $recipient->getModel()->getPrimaryKey(); $recipientSource = $this->getRecipientModelShortcut(get_class($recipient->getModel())); $m = $this->getChildModel(); if (substr($href, 0, 1) == '#') return $href; ...
[ "public", "function", "_createRedirectUrl", "(", "$", "href", ",", "$", "recipient", ")", "{", "$", "recipientPrimary", "=", "$", "recipient", "->", "getModel", "(", ")", "->", "getPrimaryKey", "(", ")", ";", "$", "recipientSource", "=", "$", "this", "->",...
TODO: when upgrading to php 5.4 change to protected (and change $that in closure to $this)
[ "TODO", ":", "when", "upgrading", "to", "php", "5", ".", "4", "change", "to", "protected", "(", "and", "change", "$that", "in", "closure", "to", "$this", ")" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Mail/Redirect/Component.php#L189-L250
koala-framework/koala-framework
Kwc/Columns/Update/20150309Legacy00001.php
Kwc_Columns_Update_20150309Legacy00001.postUpdate
public function postUpdate() { $search = array(); $replace = array(); $dbPattern = array(); $model = null; $j = 0; $components = Kwf_Component_Data_Root::getInstance() ->getComponentsByClass('Kwc_Columns_Component', array('ignoreVisible' => true)); ...
php
public function postUpdate() { $search = array(); $replace = array(); $dbPattern = array(); $model = null; $j = 0; $components = Kwf_Component_Data_Root::getInstance() ->getComponentsByClass('Kwc_Columns_Component', array('ignoreVisible' => true)); ...
[ "public", "function", "postUpdate", "(", ")", "{", "$", "search", "=", "array", "(", ")", ";", "$", "replace", "=", "array", "(", ")", ";", "$", "dbPattern", "=", "array", "(", ")", ";", "$", "model", "=", "null", ";", "$", "j", "=", "0", ";", ...
required in postUpdate as we use getComponentsByClass which would possibly not work in update()
[ "required", "in", "postUpdate", "as", "we", "use", "getComponentsByClass", "which", "would", "possibly", "not", "work", "in", "update", "()" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Columns/Update/20150309Legacy00001.php#L5-L113
koala-framework/koala-framework
Kwc/Mail/Abstract/Component.php
Kwc_Mail_Abstract_Component.send
public function send(Kwc_Mail_Recipient_Interface $recipient, $data = null, $toAddress = null, $format = null, $addViewTracker = true) { $mail = $this->createMail($recipient, $data, $toAddress, $format, $addViewTracker); return $mail->send(); }
php
public function send(Kwc_Mail_Recipient_Interface $recipient, $data = null, $toAddress = null, $format = null, $addViewTracker = true) { $mail = $this->createMail($recipient, $data, $toAddress, $format, $addViewTracker); return $mail->send(); }
[ "public", "function", "send", "(", "Kwc_Mail_Recipient_Interface", "$", "recipient", ",", "$", "data", "=", "null", ",", "$", "toAddress", "=", "null", ",", "$", "format", "=", "null", ",", "$", "addViewTracker", "=", "true", ")", "{", "$", "mail", "=", ...
Verschickt ein mail an @param $recipient. @param $data Optionale Daten die benötigt werden, kann von den Komponenten per $this->getData()->getParentByClass('Kwc_Mail_Component')->getComponent()->getMailData(); ausgelesen werden Wird von Gästebuch verwendet
[ "Verschickt", "ein", "mail", "an" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Mail/Abstract/Component.php#L203-L207
koala-framework/koala-framework
Kwc/Mail/Abstract/Component.php
Kwc_Mail_Abstract_Component.getHtml
public function getHtml(Kwc_Mail_Recipient_Interface $recipient = null, $addViewTracker = false) { $renderer = new Kwf_Component_Renderer_Mail(); $renderer->setRenderFormat(Kwf_Component_Renderer_Mail::RENDER_HTML); $renderer->setRecipient($recipient); $renderer->setHtmlStyles($this-...
php
public function getHtml(Kwc_Mail_Recipient_Interface $recipient = null, $addViewTracker = false) { $renderer = new Kwf_Component_Renderer_Mail(); $renderer->setRenderFormat(Kwf_Component_Renderer_Mail::RENDER_HTML); $renderer->setRecipient($recipient); $renderer->setHtmlStyles($this-...
[ "public", "function", "getHtml", "(", "Kwc_Mail_Recipient_Interface", "$", "recipient", "=", "null", ",", "$", "addViewTracker", "=", "false", ")", "{", "$", "renderer", "=", "new", "Kwf_Component_Renderer_Mail", "(", ")", ";", "$", "renderer", "->", "setRenderF...
Gibt den personalisierten HTML-Quelltext der Mail zurück
[ "Gibt", "den", "personalisierten", "HTML", "-", "Quelltext", "der", "Mail", "zurück" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Mail/Abstract/Component.php#L219-L251
koala-framework/koala-framework
Kwc/Mail/Abstract/Component.php
Kwc_Mail_Abstract_Component.getText
public function getText(Kwc_Mail_Recipient_Interface $recipient = null) { $renderer = new Kwf_Component_Renderer_Mail(); $renderer->setRenderFormat(Kwf_Component_Renderer_Mail::RENDER_TXT); $renderer->setRecipient($recipient); $ret = $renderer->renderComponent($this->getData()); ...
php
public function getText(Kwc_Mail_Recipient_Interface $recipient = null) { $renderer = new Kwf_Component_Renderer_Mail(); $renderer->setRenderFormat(Kwf_Component_Renderer_Mail::RENDER_TXT); $renderer->setRecipient($recipient); $ret = $renderer->renderComponent($this->getData()); ...
[ "public", "function", "getText", "(", "Kwc_Mail_Recipient_Interface", "$", "recipient", "=", "null", ")", "{", "$", "renderer", "=", "new", "Kwf_Component_Renderer_Mail", "(", ")", ";", "$", "renderer", "->", "setRenderFormat", "(", "Kwf_Component_Renderer_Mail", ":...
Gibt den personalisierten Quelltext der Mail zurück @see getHtml Für Ersetzungen siehe
[ "Gibt", "den", "personalisierten", "Quelltext", "der", "Mail", "zurück" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Mail/Abstract/Component.php#L258-L274
koala-framework/koala-framework
Kwf/Controller/Action/Auto/Grid.php
Kwf_Controller_Action_Auto_Grid.jsonDataAction
public function jsonDataAction() { $limit = null; $start = null; $order = 0; if ($this->_paging) { $limit = $this->getRequest()->getParam('limit'); $start = $this->getRequest()->getParam('start'); if (!$limit) { if (!is_array($this->_paging) && $th...
php
public function jsonDataAction() { $limit = null; $start = null; $order = 0; if ($this->_paging) { $limit = $this->getRequest()->getParam('limit'); $start = $this->getRequest()->getParam('start'); if (!$limit) { if (!is_array($this->_paging) && $th...
[ "public", "function", "jsonDataAction", "(", ")", "{", "$", "limit", "=", "null", ";", "$", "start", "=", "null", ";", "$", "order", "=", "0", ";", "if", "(", "$", "this", "->", "_paging", ")", "{", "$", "limit", "=", "$", "this", "->", "getReque...
This function is called when CONTROLLER_URL/json-data is called.
[ "This", "function", "is", "called", "when", "CONTROLLER_URL", "/", "json", "-", "data", "is", "called", "." ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Controller/Action/Auto/Grid.php#L328-L407
koala-framework/koala-framework
Kwc/Directories/Category/Detail/List/Component.php
Kwc_Directories_Category_Detail_List_Component.getTableReferenceData
static public function getTableReferenceData($relationModel, $rule/* = 'Item'*/) { if (is_string($relationModel)) { $relationModel = Kwf_Model_Abstract::getInstance($relationModel); } $reference = $relationModel->getReference($rule); $dataModel = Kwf_Model_Abstract::getI...
php
static public function getTableReferenceData($relationModel, $rule/* = 'Item'*/) { if (is_string($relationModel)) { $relationModel = Kwf_Model_Abstract::getInstance($relationModel); } $reference = $relationModel->getReference($rule); $dataModel = Kwf_Model_Abstract::getI...
[ "static", "public", "function", "getTableReferenceData", "(", "$", "relationModel", ",", "$", "rule", "/* = 'Item'*/", ")", "{", "if", "(", "is_string", "(", "$", "relationModel", ")", ")", "{", "$", "relationModel", "=", "Kwf_Model_Abstract", "::", "getInstance...
wurder ursprünglich hier verwendet was jedoch auf Expr_Child_Contains umgeschireben wurde
[ "wurder", "ursprünglich", "hier", "verwendet", "was", "jedoch", "auf", "Expr_Child_Contains", "umgeschireben", "wurde" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Directories/Category/Detail/List/Component.php#L31-L49
koala-framework/koala-framework
Kwc/Directories/Item/Directory/Trl/Events.php
Kwc_Directories_Item_Directory_Trl_Events.onChildRowUpdate
public function onChildRowUpdate(Kwf_Events_Event_Row_Updated $event) { $dbId = $event->row->component_id; $c = Kwf_Component_Data_Root::getInstance()->getComponentByDbId($dbId, array('limit'=>1, 'ignoreVisible'=>true)); if ($c && $c->parent->componentClass == $this->_class) { $t...
php
public function onChildRowUpdate(Kwf_Events_Event_Row_Updated $event) { $dbId = $event->row->component_id; $c = Kwf_Component_Data_Root::getInstance()->getComponentByDbId($dbId, array('limit'=>1, 'ignoreVisible'=>true)); if ($c && $c->parent->componentClass == $this->_class) { $t...
[ "public", "function", "onChildRowUpdate", "(", "Kwf_Events_Event_Row_Updated", "$", "event", ")", "{", "$", "dbId", "=", "$", "event", "->", "row", "->", "component_id", ";", "$", "c", "=", "Kwf_Component_Data_Root", "::", "getInstance", "(", ")", "->", "getCo...
trl model (optional)
[ "trl", "model", "(", "optional", ")" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Directories/Item/Directory/Trl/Events.php#L86-L94
koala-framework/koala-framework
Kwc/Basic/ImageEnlarge/EnlargeTag/Component.php
Kwc_Basic_ImageEnlarge_EnlargeTag_Component.getImageDimensions
public function getImageDimensions() { $dimension = $this->_getSetting('dimension'); if ($this->getRow()->use_crop) { $parentDimension = $this->_getImageEnlargeComponent()->getImageDimensions(); $dimension['crop'] = $parentDimension['crop']; } $data = $this->g...
php
public function getImageDimensions() { $dimension = $this->_getSetting('dimension'); if ($this->getRow()->use_crop) { $parentDimension = $this->_getImageEnlargeComponent()->getImageDimensions(); $dimension['crop'] = $parentDimension['crop']; } $data = $this->g...
[ "public", "function", "getImageDimensions", "(", ")", "{", "$", "dimension", "=", "$", "this", "->", "_getSetting", "(", "'dimension'", ")", ";", "if", "(", "$", "this", "->", "getRow", "(", ")", "->", "use_crop", ")", "{", "$", "parentDimension", "=", ...
This function is used by Kwc_Basic_ImageEnlarge_EnlargeTag_ImagePage_Component to get the dimension-values defined in getSettings and the crop-values if use_crop was checked.
[ "This", "function", "is", "used", "by", "Kwc_Basic_ImageEnlarge_EnlargeTag_ImagePage_Component", "to", "get", "the", "dimension", "-", "values", "defined", "in", "getSettings", "and", "the", "crop", "-", "values", "if", "use_crop", "was", "checked", "." ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Basic/ImageEnlarge/EnlargeTag/Component.php#L29-L38
koala-framework/koala-framework
Kwc/Basic/ImageEnlarge/EnlargeTag/Component.php
Kwc_Basic_ImageEnlarge_EnlargeTag_Component.getImageUrl
public function getImageUrl() { $baseUrl = $this->getBaseImageUrl(); if ($baseUrl) { $dimensions = $this->getImageDimensions(); $imageData = $this->getImageData(); $width = Kwf_Media_Image::getResponsiveWidthStep($dimensions['width'], Kwf_Media...
php
public function getImageUrl() { $baseUrl = $this->getBaseImageUrl(); if ($baseUrl) { $dimensions = $this->getImageDimensions(); $imageData = $this->getImageData(); $width = Kwf_Media_Image::getResponsiveWidthStep($dimensions['width'], Kwf_Media...
[ "public", "function", "getImageUrl", "(", ")", "{", "$", "baseUrl", "=", "$", "this", "->", "getBaseImageUrl", "(", ")", ";", "if", "(", "$", "baseUrl", ")", "{", "$", "dimensions", "=", "$", "this", "->", "getImageDimensions", "(", ")", ";", "$", "i...
This function is used by Kwc_Basic_ImageEnlarge_EnlargeTag_ImagePage_Component to get the url to show the image from parent with dimension defined through this component.
[ "This", "function", "is", "used", "by", "Kwc_Basic_ImageEnlarge_EnlargeTag_ImagePage_Component", "to", "get", "the", "url", "to", "show", "the", "image", "from", "parent", "with", "dimension", "defined", "through", "this", "component", "." ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Basic/ImageEnlarge/EnlargeTag/Component.php#L99-L113
koala-framework/koala-framework
Kwf/Util/Tcp.php
Kwf_Util_Tcp.getFreePort
public static function getFreePort($from, $host = 'localhost') { $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $ret = $from; while (true) { if (@socket_bind($socket, $host, $ret)) { break; } $ret++; if ($ret > $from+10...
php
public static function getFreePort($from, $host = 'localhost') { $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $ret = $from; while (true) { if (@socket_bind($socket, $host, $ret)) { break; } $ret++; if ($ret > $from+10...
[ "public", "static", "function", "getFreePort", "(", "$", "from", ",", "$", "host", "=", "'localhost'", ")", "{", "$", "socket", "=", "socket_create", "(", "AF_INET", ",", "SOCK_STREAM", ",", "SOL_TCP", ")", ";", "$", "ret", "=", "$", "from", ";", "whil...
Get a free port number No perfect solution, race conditions can occur
[ "Get", "a", "free", "port", "number" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/Tcp.php#L9-L24
koala-framework/koala-framework
Kwc/Chained/Trl/GeneratorEvents/Table.php
Kwc_Chained_Trl_GeneratorEvents_Table._fireComponentEvent
protected function _fireComponentEvent($eventType, Kwf_Component_Data $c, $flag) { $cls = 'Kwf_Component_Event_Component_'.$eventType; $this->fireEvent(new $cls($c->componentClass, $c, $flag)); }
php
protected function _fireComponentEvent($eventType, Kwf_Component_Data $c, $flag) { $cls = 'Kwf_Component_Event_Component_'.$eventType; $this->fireEvent(new $cls($c->componentClass, $c, $flag)); }
[ "protected", "function", "_fireComponentEvent", "(", "$", "eventType", ",", "Kwf_Component_Data", "$", "c", ",", "$", "flag", ")", "{", "$", "cls", "=", "'Kwf_Component_Event_Component_'", ".", "$", "eventType", ";", "$", "this", "->", "fireEvent", "(", "new",...
overridden in Page_Events_Table to fire Page events
[ "overridden", "in", "Page_Events_Table", "to", "fire", "Page", "events" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Chained/Trl/GeneratorEvents/Table.php#L45-L49
koala-framework/koala-framework
Kwf/Assets/Util/Trl.php
Kwf_Assets_Util_Trl.getJsReplacement
public static function getJsReplacement($trlElement) { $b = $trlElement['before']; $fn = substr($b, 0, strpos($b, '(')); $key = $trlElement['type'].'.'.$trlElement['source']; if (isset($trlElement['context'])) $key .= '.'.$trlElement['context']; $key .= '.'.str_replace("'", "...
php
public static function getJsReplacement($trlElement) { $b = $trlElement['before']; $fn = substr($b, 0, strpos($b, '(')); $key = $trlElement['type'].'.'.$trlElement['source']; if (isset($trlElement['context'])) $key .= '.'.$trlElement['context']; $key .= '.'.str_replace("'", "...
[ "public", "static", "function", "getJsReplacement", "(", "$", "trlElement", ")", "{", "$", "b", "=", "$", "trlElement", "[", "'before'", "]", ";", "$", "fn", "=", "substr", "(", "$", "b", ",", "0", ",", "strpos", "(", "$", "b", ",", "'('", ")", "...
used by Kwf_Assets_Dependency_File_Js and Kwf_Assets_CommonJs_Underscore_TemplateDependency
[ "used", "by", "Kwf_Assets_Dependency_File_Js", "and", "Kwf_Assets_CommonJs_Underscore_TemplateDependency" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Assets/Util/Trl.php#L6-L33
koala-framework/koala-framework
Kwf/Util/ModelSync.php
Kwf_Util_ModelSync.sync
public static function sync(Kwf_Model_Abstract $model, array $compareColumns, array $data, Kwf_Model_Select $select = null) { $sync = new Kwf_Util_ModelSync($model, $compareColumns); $sync->syncData($data, $select); return $sync->getMappingForLastSync(); }
php
public static function sync(Kwf_Model_Abstract $model, array $compareColumns, array $data, Kwf_Model_Select $select = null) { $sync = new Kwf_Util_ModelSync($model, $compareColumns); $sync->syncData($data, $select); return $sync->getMappingForLastSync(); }
[ "public", "static", "function", "sync", "(", "Kwf_Model_Abstract", "$", "model", ",", "array", "$", "compareColumns", ",", "array", "$", "data", ",", "Kwf_Model_Select", "$", "select", "=", "null", ")", "{", "$", "sync", "=", "new", "Kwf_Util_ModelSync", "("...
Syncs given array with given rowset @param mixed Model @param array() Name of columns which are used to compare the syncing rows @param array Data to sync @param mixed Which rows are to be considered for syncing @return array Mapping of synced rows ("key of import array" => "id of synced row")
[ "Syncs", "given", "array", "with", "given", "rowset" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/ModelSync.php#L92-L97
koala-framework/koala-framework
Kwf/Db/Table.php
Kwf_Db_Table.setOptions
public function setOptions(Array $options) { foreach ($options as $key => $value) { switch ($key) { case self::ADAPTER: $this->_setAdapter($value); break; case self::SCHEMA: $this->_schema = (string) $val...
php
public function setOptions(Array $options) { foreach ($options as $key => $value) { switch ($key) { case self::ADAPTER: $this->_setAdapter($value); break; case self::SCHEMA: $this->_schema = (string) $val...
[ "public", "function", "setOptions", "(", "Array", "$", "options", ")", "{", "foreach", "(", "$", "options", "as", "$", "key", "=>", "$", "value", ")", "{", "switch", "(", "$", "key", ")", "{", "case", "self", "::", "ADAPTER", ":", "$", "this", "->"...
setOptions() @param array $options @return Kwf_Db_Table
[ "setOptions", "()" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Db/Table.php#L222-L248
koala-framework/koala-framework
Kwf/Db/Table.php
Kwf_Db_Table._setupTableName
protected function _setupTableName() { if (strpos($this->_name, '.')) { list($this->_schema, $this->_name) = explode('.', $this->_name); } }
php
protected function _setupTableName() { if (strpos($this->_name, '.')) { list($this->_schema, $this->_name) = explode('.', $this->_name); } }
[ "protected", "function", "_setupTableName", "(", ")", "{", "if", "(", "strpos", "(", "$", "this", "->", "_name", ",", "'.'", ")", ")", "{", "list", "(", "$", "this", "->", "_schema", ",", "$", "this", "->", "_name", ")", "=", "explode", "(", "'.'",...
Initialize table and schema names. If the table name is not set in the class definition, use the class name itself as the table name. A schema name provided with the table name (e.g., "schema.table") overrides any existing value for $this->_schema. @return void
[ "Initialize", "table", "and", "schema", "names", "." ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Db/Table.php#L303-L308
koala-framework/koala-framework
Kwf/Db/Table.php
Kwf_Db_Table._setupMetadata
protected function _setupMetadata() { if (count($this->_metadata) > 0) { return true; } // Assume that metadata will be loaded from cache $isMetadataFromCache = true; // Define the cache identifier where the metadata are saved //get db configuration ...
php
protected function _setupMetadata() { if (count($this->_metadata) > 0) { return true; } // Assume that metadata will be loaded from cache $isMetadataFromCache = true; // Define the cache identifier where the metadata are saved //get db configuration ...
[ "protected", "function", "_setupMetadata", "(", ")", "{", "if", "(", "count", "(", "$", "this", "->", "_metadata", ")", ">", "0", ")", "{", "return", "true", ";", "}", "// Assume that metadata will be loaded from cache", "$", "isMetadataFromCache", "=", "true", ...
Initializes metadata. If metadata cannot be loaded from cache, adapter's describeTable() method is called to discover metadata information. Returns true if and only if the metadata are loaded from cache. @return boolean @throws Kwf_Exception
[ "Initializes", "metadata", "." ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Db/Table.php#L319-L366
koala-framework/koala-framework
Kwf/Db/Table.php
Kwf_Db_Table.getColumns
public function getColumns() { if (null === $this->_cols) { $this->_setupMetadata(); $this->_cols = array_keys($this->_metadata); } return $this->_cols; }
php
public function getColumns() { if (null === $this->_cols) { $this->_setupMetadata(); $this->_cols = array_keys($this->_metadata); } return $this->_cols; }
[ "public", "function", "getColumns", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "_cols", ")", "{", "$", "this", "->", "_setupMetadata", "(", ")", ";", "$", "this", "->", "_cols", "=", "array_keys", "(", "$", "this", "->", "_metadata",...
Retrieve table columns @return array
[ "Retrieve", "table", "columns" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Db/Table.php#L373-L380
koala-framework/koala-framework
Kwf/Db/Table.php
Kwf_Db_Table.info
public function info($key = null) { $this->_setupPrimaryKey(); $info = array( self::SCHEMA => $this->_schema, self::NAME => $this->_name, self::COLS => $this->getColumns(), self::PRIMARY => $this->getPrimaryK...
php
public function info($key = null) { $this->_setupPrimaryKey(); $info = array( self::SCHEMA => $this->_schema, self::NAME => $this->_name, self::COLS => $this->getColumns(), self::PRIMARY => $this->getPrimaryK...
[ "public", "function", "info", "(", "$", "key", "=", "null", ")", "{", "$", "this", "->", "_setupPrimaryKey", "(", ")", ";", "$", "info", "=", "array", "(", "self", "::", "SCHEMA", "=>", "$", "this", "->", "_schema", ",", "self", "::", "NAME", "=>",...
Returns table information. You can elect to return only a part of this information by supplying its key name, otherwise all information is returned as an array. @param string $key The specific info part to return OPTIONAL @return mixed @throws Kwf_Exception
[ "Returns", "table", "information", "." ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Db/Table.php#L476-L498
koala-framework/koala-framework
Kwf/Db/Table.php
Kwf_Db_Table.fetchAll
public function fetchAll($where = null, $order = null, $count = null, $offset = null) { if (!($where instanceof Kwf_Db_Table_Select)) { $select = $this->select(); if ($where !== null) { $this->_where($select, $where); } if ($order !== null) {...
php
public function fetchAll($where = null, $order = null, $count = null, $offset = null) { if (!($where instanceof Kwf_Db_Table_Select)) { $select = $this->select(); if ($where !== null) { $this->_where($select, $where); } if ($order !== null) {...
[ "public", "function", "fetchAll", "(", "$", "where", "=", "null", ",", "$", "order", "=", "null", ",", "$", "count", "=", "null", ",", "$", "offset", "=", "null", ")", "{", "if", "(", "!", "(", "$", "where", "instanceof", "Kwf_Db_Table_Select", ")", ...
Fetches all rows. Honors the Zend_Db_Adapter fetch mode. @param string|array|Kwf_Db_Table_Select $where OPTIONAL An SQL WHERE clause or Kwf_Db_Table_Select object. @param string|array $order OPTIONAL An SQL ORDER clause. @param int $count OPTIONAL An SQL LIMIT cou...
[ "Fetches", "all", "rows", "." ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Db/Table.php#L610-L642
koala-framework/koala-framework
Kwf/Db/Table.php
Kwf_Db_Table.fetchRow
public function fetchRow($where = null, $order = null, $offset = null) { if (!($where instanceof Kwf_Db_Table_Select)) { $select = $this->select(); if ($where !== null) { $this->_where($select, $where); } if ($order !== null) { ...
php
public function fetchRow($where = null, $order = null, $offset = null) { if (!($where instanceof Kwf_Db_Table_Select)) { $select = $this->select(); if ($where !== null) { $this->_where($select, $where); } if ($order !== null) { ...
[ "public", "function", "fetchRow", "(", "$", "where", "=", "null", ",", "$", "order", "=", "null", ",", "$", "offset", "=", "null", ")", "{", "if", "(", "!", "(", "$", "where", "instanceof", "Kwf_Db_Table_Select", ")", ")", "{", "$", "select", "=", ...
Fetches one row in an object of type Kwf_Db_Table_Row, or returns null if no row matches the specified criteria. @param string|array|Kwf_Db_Table_Select $where OPTIONAL An SQL WHERE clause or Kwf_Db_Table_Select object. @param string|array $order OPTIONAL An SQL ORDER clause. @param int ...
[ "Fetches", "one", "row", "in", "an", "object", "of", "type", "Kwf_Db_Table_Row", "or", "returns", "null", "if", "no", "row", "matches", "the", "specified", "criteria", "." ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Db/Table.php#L654-L687
koala-framework/koala-framework
Kwf/Db/Table.php
Kwf_Db_Table.createRow
public function createRow(array $data = array()) { $cols = $this->getColumns(); $defaults = array_combine($cols, array_fill(0, count($cols), null)); $config = array( 'table' => $this, 'data' => $defaults, 'stored' => false ); ...
php
public function createRow(array $data = array()) { $cols = $this->getColumns(); $defaults = array_combine($cols, array_fill(0, count($cols), null)); $config = array( 'table' => $this, 'data' => $defaults, 'stored' => false ); ...
[ "public", "function", "createRow", "(", "array", "$", "data", "=", "array", "(", ")", ")", "{", "$", "cols", "=", "$", "this", "->", "getColumns", "(", ")", ";", "$", "defaults", "=", "array_combine", "(", "$", "cols", ",", "array_fill", "(", "0", ...
Fetches a new blank row (not from the database). @param array $data OPTIONAL data to populate in the new row. @return Kwf_Db_Table_Row_Abstract
[ "Fetches", "a", "new", "blank", "row", "(", "not", "from", "the", "database", ")", "." ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Db/Table.php#L695-L710
koala-framework/koala-framework
Kwf/Db/Table.php
Kwf_Db_Table._where
protected function _where(Kwf_Db_Table_Select $select, $where) { $where = (array) $where; foreach ($where as $key => $val) { // is $key an int? if (is_int($key)) { // $val is the full condition $select->where($val); } else { ...
php
protected function _where(Kwf_Db_Table_Select $select, $where) { $where = (array) $where; foreach ($where as $key => $val) { // is $key an int? if (is_int($key)) { // $val is the full condition $select->where($val); } else { ...
[ "protected", "function", "_where", "(", "Kwf_Db_Table_Select", "$", "select", ",", "$", "where", ")", "{", "$", "where", "=", "(", "array", ")", "$", "where", ";", "foreach", "(", "$", "where", "as", "$", "key", "=>", "$", "val", ")", "{", "// is $ke...
Generate WHERE clause from user-supplied string or array @param string|array $where OPTIONAL An SQL WHERE clause. @return Kwf_Db_Table_Select
[ "Generate", "WHERE", "clause", "from", "user", "-", "supplied", "string", "or", "array" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Db/Table.php#L718-L735
koala-framework/koala-framework
Kwf/Db/Table.php
Kwf_Db_Table._order
protected function _order(Kwf_Db_Table_Select $select, $order) { if (!is_array($order)) { $order = array($order); } foreach ($order as $val) { $select->order($val); } return $select; }
php
protected function _order(Kwf_Db_Table_Select $select, $order) { if (!is_array($order)) { $order = array($order); } foreach ($order as $val) { $select->order($val); } return $select; }
[ "protected", "function", "_order", "(", "Kwf_Db_Table_Select", "$", "select", ",", "$", "order", ")", "{", "if", "(", "!", "is_array", "(", "$", "order", ")", ")", "{", "$", "order", "=", "array", "(", "$", "order", ")", ";", "}", "foreach", "(", "...
Generate ORDER clause from user-supplied string or array @param string|array $order OPTIONAL An SQL ORDER clause. @return Kwf_Db_Table_Select
[ "Generate", "ORDER", "clause", "from", "user", "-", "supplied", "string", "or", "array" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Db/Table.php#L743-L754
koala-framework/koala-framework
Kwf/Media/Output.php
Kwf_Media_Output.getOutputData
public static function getOutputData($file, array $headers) { $ret = array('headers' => array()); if (!isset($file['contents'])) { if (isset($file['file'])) { if (!is_file($file['file'])) { throw new Kwf_Exception_NotFound("File '$file[file]' not foun...
php
public static function getOutputData($file, array $headers) { $ret = array('headers' => array()); if (!isset($file['contents'])) { if (isset($file['file'])) { if (!is_file($file['file'])) { throw new Kwf_Exception_NotFound("File '$file[file]' not foun...
[ "public", "static", "function", "getOutputData", "(", "$", "file", ",", "array", "$", "headers", ")", "{", "$", "ret", "=", "array", "(", "'headers'", "=>", "array", "(", ")", ")", ";", "if", "(", "!", "isset", "(", "$", "file", "[", "'contents'", ...
PUBLIC METHOD FOR UNIT TESTING ONLY !
[ "PUBLIC", "METHOD", "FOR", "UNIT", "TESTING", "ONLY", "!" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Media/Output.php#L60-L240
koala-framework/koala-framework
Kwf/Media/Output.php
Kwf_Media_Output._getPartialFileContent
private static function _getPartialFileContent($file, $range) { $length = $range[1]-$range[0]+1; if( !$handle = fopen($file, 'r') ) throw new Kwf_Exception(sprintf("Could not get handle for file %s", $file)); if( fseek($handle, $range[0], SEEK_SET) == -1 ) throw new ...
php
private static function _getPartialFileContent($file, $range) { $length = $range[1]-$range[0]+1; if( !$handle = fopen($file, 'r') ) throw new Kwf_Exception(sprintf("Could not get handle for file %s", $file)); if( fseek($handle, $range[0], SEEK_SET) == -1 ) throw new ...
[ "private", "static", "function", "_getPartialFileContent", "(", "$", "file", ",", "$", "range", ")", "{", "$", "length", "=", "$", "range", "[", "1", "]", "-", "$", "range", "[", "0", "]", "+", "1", ";", "if", "(", "!", "$", "handle", "=", "fopen...
returns the partial content from a file
[ "returns", "the", "partial", "content", "from", "a", "file" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Media/Output.php#L252-L263
koala-framework/koala-framework
Kwf/Util/Check/Ip.php
Kwf_Util_Check_Ip.checkIp
public function checkIp($ip = null, $preventException = false) { if (is_null($ip)) { $ip = $_SERVER['REMOTE_ADDR']; } if (!preg_match('/^(\d|\*){1,3}\.(\d|\*){1,3}\.(\d|\*){1,3}\.(\d|\*){1,3}$/', $ip)) { throw new Kwf_Exception("The set IP address '$ip' is not an Ip ...
php
public function checkIp($ip = null, $preventException = false) { if (is_null($ip)) { $ip = $_SERVER['REMOTE_ADDR']; } if (!preg_match('/^(\d|\*){1,3}\.(\d|\*){1,3}\.(\d|\*){1,3}\.(\d|\*){1,3}$/', $ip)) { throw new Kwf_Exception("The set IP address '$ip' is not an Ip ...
[ "public", "function", "checkIp", "(", "$", "ip", "=", "null", ",", "$", "preventException", "=", "false", ")", "{", "if", "(", "is_null", "(", "$", "ip", ")", ")", "{", "$", "ip", "=", "$", "_SERVER", "[", "'REMOTE_ADDR'", "]", ";", "}", "if", "(...
Checkt ob eine IP-Adresse in den von {@link _getAllowedAddresses} zurückgegebenen IPs / Domains erlaubt ist @param string $ip [optional] Die zu überprüfende IP-Adresse. Wenn nicht übergeben wird die REMOTE_ADDR verwendet @param boolean $preventException [optional] Wenn true wird ein boolscher Wert returned und in kein...
[ "Checkt", "ob", "eine", "IP", "-", "Adresse", "in", "den", "von", "{", "@link", "_getAllowedAddresses", "}", "zurückgegebenen", "IPs", "/", "Domains", "erlaubt", "ist" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Util/Check/Ip.php#L56-L103
koala-framework/koala-framework
Kwf/Cache/SimpleStatic.php
Kwf_Cache_SimpleStatic.clear
public static function clear($cacheIdPrefix) { if (!extension_loaded('apc') || PHP_SAPI == 'cli') { self::$_cache = array(); //don't use $cacheIdPrefix as filenames are base64 encoded foreach (glob('cache/simpleStatic/*') as $f) { unlink($f); }...
php
public static function clear($cacheIdPrefix) { if (!extension_loaded('apc') || PHP_SAPI == 'cli') { self::$_cache = array(); //don't use $cacheIdPrefix as filenames are base64 encoded foreach (glob('cache/simpleStatic/*') as $f) { unlink($f); }...
[ "public", "static", "function", "clear", "(", "$", "cacheIdPrefix", ")", "{", "if", "(", "!", "extension_loaded", "(", "'apc'", ")", "||", "PHP_SAPI", "==", "'cli'", ")", "{", "self", "::", "$", "_cache", "=", "array", "(", ")", ";", "//don't use $cacheI...
clear static cache with prefix, don't use except in clear-cache-watcher @internal
[ "clear", "static", "cache", "with", "prefix", "don", "t", "use", "except", "in", "clear", "-", "cache", "-", "watcher" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Cache/SimpleStatic.php#L120-L152
koala-framework/koala-framework
Kwf/Cache/SimpleStatic.php
Kwf_Cache_SimpleStatic._delete
public static function _delete($cacheIds) { if (!is_array($cacheIds)) $cacheIds = array($cacheIds); $ret = true; if (!extension_loaded('apc') || PHP_SAPI == 'cli') { foreach ($cacheIds as $cacheId) { unset(self::$_cache[$cacheId]); $file = self::_...
php
public static function _delete($cacheIds) { if (!is_array($cacheIds)) $cacheIds = array($cacheIds); $ret = true; if (!extension_loaded('apc') || PHP_SAPI == 'cli') { foreach ($cacheIds as $cacheId) { unset(self::$_cache[$cacheId]); $file = self::_...
[ "public", "static", "function", "_delete", "(", "$", "cacheIds", ")", "{", "if", "(", "!", "is_array", "(", "$", "cacheIds", ")", ")", "$", "cacheIds", "=", "array", "(", "$", "cacheIds", ")", ";", "$", "ret", "=", "true", ";", "if", "(", "!", "e...
Delete static cache, don't use except in unittests @internal
[ "Delete", "static", "cache", "don", "t", "use", "except", "in", "unittests" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Cache/SimpleStatic.php#L159-L187
koala-framework/koala-framework
Kwc/Form/Dynamic/Form/Component.php
Kwc_Form_Dynamic_Form_Component._findFormFields
private static function _findFormFields($data) { $ret = array(); foreach ($data->getChildComponents(array('page'=>false, 'pseudoPage'=>false)) as $c) { if (Kwc_Abstract::getFlag($c->componentClass, 'formField')) { $ret[] = $c; } $ret = array_merge(...
php
private static function _findFormFields($data) { $ret = array(); foreach ($data->getChildComponents(array('page'=>false, 'pseudoPage'=>false)) as $c) { if (Kwc_Abstract::getFlag($c->componentClass, 'formField')) { $ret[] = $c; } $ret = array_merge(...
[ "private", "static", "function", "_findFormFields", "(", "$", "data", ")", "{", "$", "ret", "=", "array", "(", ")", ";", "foreach", "(", "$", "data", "->", "getChildComponents", "(", "array", "(", "'page'", "=>", "false", ",", "'pseudoPage'", "=>", "fals...
don't use getRecursiveChildComponents as that won't return items in an defined order
[ "don", "t", "use", "getRecursiveChildComponents", "as", "that", "won", "t", "return", "items", "in", "an", "defined", "order" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwc/Form/Dynamic/Form/Component.php#L57-L67
koala-framework/koala-framework
Kwf/Session.php
Kwf_Session._processValidators
private static function _processValidators() { foreach ($_SESSION['__KWF']['VALID'] as $validator_name => $valid_data) { $validator = new $validator_name; if ($validator->validate() === false) { $_SESSION = array(); Zend_Session::regenerateId(); ...
php
private static function _processValidators() { foreach ($_SESSION['__KWF']['VALID'] as $validator_name => $valid_data) { $validator = new $validator_name; if ($validator->validate() === false) { $_SESSION = array(); Zend_Session::regenerateId(); ...
[ "private", "static", "function", "_processValidators", "(", ")", "{", "foreach", "(", "$", "_SESSION", "[", "'__KWF'", "]", "[", "'VALID'", "]", "as", "$", "validator_name", "=>", "$", "valid_data", ")", "{", "$", "validator", "=", "new", "$", "validator_n...
instead empty session
[ "instead", "empty", "session" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Session.php#L47-L57
koala-framework/koala-framework
Kwf/View/Helper/Abstract/MailLink.php
Kwf_View_Helper_Abstract_MailLink.encodeMail
public function encodeMail($address) { if ($this->_getRenderer() instanceof Kwf_Component_Renderer_Mail) { return $text; } $address = trim($address); $address = preg_replace('/^(.+)@(.+)\.([^\.\s]+)$/i', '$1'.$this->_atEncoding.'$2'.$this->_dotEncoding.'$3', ...
php
public function encodeMail($address) { if ($this->_getRenderer() instanceof Kwf_Component_Renderer_Mail) { return $text; } $address = trim($address); $address = preg_replace('/^(.+)@(.+)\.([^\.\s]+)$/i', '$1'.$this->_atEncoding.'$2'.$this->_dotEncoding.'$3', ...
[ "public", "function", "encodeMail", "(", "$", "address", ")", "{", "if", "(", "$", "this", "->", "_getRenderer", "(", ")", "instanceof", "Kwf_Component_Renderer_Mail", ")", "{", "return", "$", "text", ";", "}", "$", "address", "=", "trim", "(", "$", "add...
wird zB in LinkTag_Mail_Data.php verwendet, deshalb public
[ "wird", "zB", "in", "LinkTag_Mail_Data", ".", "php", "verwendet", "deshalb", "public" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/View/Helper/Abstract/MailLink.php#L10-L21
koala-framework/koala-framework
Kwf/Exception.php
Kwf_Exception.notify
public function notify() { if ($this->log()) { return; } if (PHP_SAPI == 'cli') { echo 'WARNING: '.$this->getMessage()."\n"; } else if ( Zend_Registry::get('config')->debug->firephp && class_exists('FirePHP') && FirePHP::get...
php
public function notify() { if ($this->log()) { return; } if (PHP_SAPI == 'cli') { echo 'WARNING: '.$this->getMessage()."\n"; } else if ( Zend_Registry::get('config')->debug->firephp && class_exists('FirePHP') && FirePHP::get...
[ "public", "function", "notify", "(", ")", "{", "if", "(", "$", "this", "->", "log", "(", ")", ")", "{", "return", ";", "}", "if", "(", "PHP_SAPI", "==", "'cli'", ")", "{", "echo", "'WARNING: '", ".", "$", "this", "->", "getMessage", "(", ")", "."...
Informiert den Entwickler über diese Exception
[ "Informiert", "den", "Entwickler", "über", "diese", "Exception" ]
train
https://github.com/koala-framework/koala-framework/blob/2131b9b10b6c368ea02ad448d5f8a4deef0fe971/Kwf/Exception.php#L7-L22