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
CPSB/Validation-helper
src/Form.php
Form.error
public function error($name, $template = null) { $errors = $this->session->get('errors'); // Default template is bootstrap friendly. if (is_null($template)) { $template = config('form-helpers.error_template'); } if ($errors && $errors->has($name)) { re...
php
public function error($name, $template = null) { $errors = $this->session->get('errors'); // Default template is bootstrap friendly. if (is_null($template)) { $template = config('form-helpers.error_template'); } if ($errors && $errors->has($name)) { re...
[ "public", "function", "error", "(", "$", "name", ",", "$", "template", "=", "null", ")", "{", "$", "errors", "=", "$", "this", "->", "session", "->", "get", "(", "'errors'", ")", ";", "// Default template is bootstrap friendly.", "if", "(", "is_null", "(",...
Get the error message if exists. @param string $name @param string|null $template @return string|null
[ "Get", "the", "error", "message", "if", "exists", "." ]
train
https://github.com/CPSB/Validation-helper/blob/adb91cb42b7e3c1f88be059a8b4f86de5aba64cc/src/Form.php#L149-L159
CPSB/Validation-helper
src/Form.php
Form.value
public function value($name, $default = null) { if (! is_null($value = $this->valueFromOld($name))) { return $value; } if (! is_null($value = $this->valueFromModel($name))) { return $value; } return $default; }
php
public function value($name, $default = null) { if (! is_null($value = $this->valueFromOld($name))) { return $value; } if (! is_null($value = $this->valueFromModel($name))) { return $value; } return $default; }
[ "public", "function", "value", "(", "$", "name", ",", "$", "default", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", "=", "$", "this", "->", "valueFromOld", "(", "$", "name", ")", ")", ")", "{", "return", "$", "value", ";", ...
Get the value to use in an input field. @param string $name @param mixed|null $default @return mixed|null
[ "Get", "the", "value", "to", "use", "in", "an", "input", "field", "." ]
train
https://github.com/CPSB/Validation-helper/blob/adb91cb42b7e3c1f88be059a8b4f86de5aba64cc/src/Form.php#L168-L178
jfusion/org.jfusion.framework
src/Framework.php
Framework.hasFeature
public static function hasFeature($jname, $feature) { $return = false; $admin = Factory::getAdmin($jname); $user = Factory::getUser($jname); switch ($feature) { //Admin Features case 'wizard': $return = $admin->methodDefined('setupFromPath'); ...
php
public static function hasFeature($jname, $feature) { $return = false; $admin = Factory::getAdmin($jname); $user = Factory::getUser($jname); switch ($feature) { //Admin Features case 'wizard': $return = $admin->methodDefined('setupFromPath'); ...
[ "public", "static", "function", "hasFeature", "(", "$", "jname", ",", "$", "feature", ")", "{", "$", "return", "=", "false", ";", "$", "admin", "=", "Factory", "::", "getAdmin", "(", "$", "jname", ")", ";", "$", "user", "=", "Factory", "::", "getUser...
Check if feature exists @static @param string $jname @param string $feature feature @return bool
[ "Check", "if", "feature", "exists" ]
train
https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Framework.php#L75-L123
jfusion/org.jfusion.framework
src/Framework.php
Framework.getXml
public static function getXml($data, $isFile = true) { // Disable libxml errors and allow to fetch error information as needed libxml_use_internal_errors(true); if ($isFile) { // Try to load the XML file $xml = simplexml_load_file($data); } else { // Try to load the XML string $xml = simplexml_loa...
php
public static function getXml($data, $isFile = true) { // Disable libxml errors and allow to fetch error information as needed libxml_use_internal_errors(true); if ($isFile) { // Try to load the XML file $xml = simplexml_load_file($data); } else { // Try to load the XML string $xml = simplexml_loa...
[ "public", "static", "function", "getXml", "(", "$", "data", ",", "$", "isFile", "=", "true", ")", "{", "// Disable libxml errors and allow to fetch error information as needed", "libxml_use_internal_errors", "(", "true", ")", ";", "if", "(", "$", "isFile", ")", "{",...
Checks to see if a JFusion plugin is properly configured @param string $data file path or file content @param boolean $isFile load from file @throws \Symfony\Component\Yaml\Exception\RuntimeException @return SimpleXMLElement returns true if plugin is correctly configured
[ "Checks", "to", "see", "if", "a", "JFusion", "plugin", "is", "properly", "configured" ]
train
https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Framework.php#L134-L161
jfusion/org.jfusion.framework
src/Framework.php
Framework.raise
public static function raise($type, $message, $jname = '') { if (is_array($message)) { foreach ($message as $msgtype => $msg) { //if still an array implode for nicer display if (is_numeric($msgtype)) { $msgtype = $jname; } static::raise($type, $msg, $msgtype); } } else { $app = Applica...
php
public static function raise($type, $message, $jname = '') { if (is_array($message)) { foreach ($message as $msgtype => $msg) { //if still an array implode for nicer display if (is_numeric($msgtype)) { $msgtype = $jname; } static::raise($type, $msg, $msgtype); } } else { $app = Applica...
[ "public", "static", "function", "raise", "(", "$", "type", ",", "$", "message", ",", "$", "jname", "=", "''", ")", "{", "if", "(", "is_array", "(", "$", "message", ")", ")", "{", "foreach", "(", "$", "message", "as", "$", "msgtype", "=>", "$", "m...
Raise warning function that can handle arrays @param $type @param array|string|Exception $message message itself @param string $jname @return string nothing
[ "Raise", "warning", "function", "that", "can", "handle", "arrays" ]
train
https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Framework.php#L172-L191
jfusion/org.jfusion.framework
src/Framework.php
Framework.getImageSize
public static function getImageSize($filename) { $result = false; ob_start(); if (strpos($filename, '://') !== false && function_exists('fopen') && ini_get('allow_url_fopen')) { $stream = fopen($filename, 'r'); $rawdata = stream_get_contents($stream, 24); if($rawdata) { $type = null; /** *...
php
public static function getImageSize($filename) { $result = false; ob_start(); if (strpos($filename, '://') !== false && function_exists('fopen') && ini_get('allow_url_fopen')) { $stream = fopen($filename, 'r'); $rawdata = stream_get_contents($stream, 24); if($rawdata) { $type = null; /** *...
[ "public", "static", "function", "getImageSize", "(", "$", "filename", ")", "{", "$", "result", "=", "false", ";", "ob_start", "(", ")", ";", "if", "(", "strpos", "(", "$", "filename", ",", "'://'", ")", "!==", "false", "&&", "function_exists", "(", "'f...
@param string $filename file name or url @return boolean|stdClass
[ "@param", "string", "$filename", "file", "name", "or", "url" ]
train
https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Framework.php#L198-L325
jfusion/org.jfusion.framework
src/Framework.php
Framework.getNodeID
public static function getNodeID() { $url = Config::get()->get('uri.base.full'); return strtolower(rtrim(parse_url($url, PHP_URL_HOST) . parse_url($url, PHP_URL_PATH), '/')); }
php
public static function getNodeID() { $url = Config::get()->get('uri.base.full'); return strtolower(rtrim(parse_url($url, PHP_URL_HOST) . parse_url($url, PHP_URL_PATH), '/')); }
[ "public", "static", "function", "getNodeID", "(", ")", "{", "$", "url", "=", "Config", "::", "get", "(", ")", "->", "get", "(", "'uri.base.full'", ")", ";", "return", "strtolower", "(", "rtrim", "(", "parse_url", "(", "$", "url", ",", "PHP_URL_HOST", "...
@static @return string
[ "@static" ]
train
https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Framework.php#L361-L365
jfusion/org.jfusion.framework
src/Framework.php
Framework.getPluginPath
public static function getPluginPath($name = null) { $path = Config::get()->get('plugin.path'); if ($name != null) { $path = $path . '/' . $name; } return $path; }
php
public static function getPluginPath($name = null) { $path = Config::get()->get('plugin.path'); if ($name != null) { $path = $path . '/' . $name; } return $path; }
[ "public", "static", "function", "getPluginPath", "(", "$", "name", "=", "null", ")", "{", "$", "path", "=", "Config", "::", "get", "(", ")", "->", "get", "(", "'plugin.path'", ")", ";", "if", "(", "$", "name", "!=", "null", ")", "{", "$", "path", ...
@static @param string $name @return string
[ "@static" ]
train
https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Framework.php#L374-L381
jfusion/org.jfusion.framework
src/Framework.php
Framework.getComposerInfo
public static function getComposerInfo($libery = 'jfusion/framework') { $lib = null; $installed = __DIR__ . '/../../../composer/installed.json'; if (file_exists($installed)) { $json = json_decode(file_get_contents($installed)); foreach($json as $node) { if ($node->name === $libery) { $lib = $node;...
php
public static function getComposerInfo($libery = 'jfusion/framework') { $lib = null; $installed = __DIR__ . '/../../../composer/installed.json'; if (file_exists($installed)) { $json = json_decode(file_get_contents($installed)); foreach($json as $node) { if ($node->name === $libery) { $lib = $node;...
[ "public", "static", "function", "getComposerInfo", "(", "$", "libery", "=", "'jfusion/framework'", ")", "{", "$", "lib", "=", "null", ";", "$", "installed", "=", "__DIR__", ".", "'/../../../composer/installed.json'", ";", "if", "(", "file_exists", "(", "$", "i...
@param $libery @return stdClass|null
[ "@param", "$libery" ]
train
https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Framework.php#L388-L402
jfusion/org.jfusion.framework
src/Framework.php
Framework.validateUser
public static function validateUser($userinfo) { $plugins = Factory::getPlugins(); foreach($plugins as $plugin) { $user = Factory::getUser($plugin->name); if (!$user->validateUser($userinfo)) { throw new \RuntimeException('unknown validation: ' . $plugin->name); } } return true; }
php
public static function validateUser($userinfo) { $plugins = Factory::getPlugins(); foreach($plugins as $plugin) { $user = Factory::getUser($plugin->name); if (!$user->validateUser($userinfo)) { throw new \RuntimeException('unknown validation: ' . $plugin->name); } } return true; }
[ "public", "static", "function", "validateUser", "(", "$", "userinfo", ")", "{", "$", "plugins", "=", "Factory", "::", "getPlugins", "(", ")", ";", "foreach", "(", "$", "plugins", "as", "$", "plugin", ")", "{", "$", "user", "=", "Factory", "::", "getUse...
@param Userinfo $userinfo @return bool
[ "@param", "Userinfo", "$userinfo" ]
train
https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Framework.php#L409-L420
ClanCats/Core
src/bundles/Auth/CCAuth.php
CCAuth.validate
public static function validate( $identifier, $password, $name = null ) { return Handler::create( $name )->validate( $identifier, $password ); }
php
public static function validate( $identifier, $password, $name = null ) { return Handler::create( $name )->validate( $identifier, $password ); }
[ "public", "static", "function", "validate", "(", "$", "identifier", ",", "$", "password", ",", "$", "name", "=", "null", ")", "{", "return", "Handler", "::", "create", "(", "$", "name", ")", "->", "validate", "(", "$", "identifier", ",", "$", "password...
Validate user credentials @param mixed $identifier @param string $password @param string $name The auth instance @return bool
[ "Validate", "user", "credentials" ]
train
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Auth/CCAuth.php#L44-L47
ClanCats/Core
src/bundles/Auth/CCAuth.php
CCAuth.sign_in
public static function sign_in( \Auth\User $user, $keep_loggedin = true, $name = null ) { return Handler::create( $name )->sign_in( $user, $keep_loggedin ); }
php
public static function sign_in( \Auth\User $user, $keep_loggedin = true, $name = null ) { return Handler::create( $name )->sign_in( $user, $keep_loggedin ); }
[ "public", "static", "function", "sign_in", "(", "\\", "Auth", "\\", "User", "$", "user", ",", "$", "keep_loggedin", "=", "true", ",", "$", "name", "=", "null", ")", "{", "return", "Handler", "::", "create", "(", "$", "name", ")", "->", "sign_in", "("...
Sign in a user @param Auth\User $user @param string $keep_loggedin @param string $name The auth instance @return bool
[ "Sign", "in", "a", "user" ]
train
https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Auth/CCAuth.php#L57-L60
slashworks/control-bundle
src/Slashworks/BackendBundle/Model/om/BaseSystemSettingsPeer.php
BaseSystemSettingsPeer.getFieldNames
public static function getFieldNames($type = BasePeer::TYPE_PHPNAME) { if (!array_key_exists($type, SystemSettingsPeer::$fieldNames)) { throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPN...
php
public static function getFieldNames($type = BasePeer::TYPE_PHPNAME) { if (!array_key_exists($type, SystemSettingsPeer::$fieldNames)) { throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPN...
[ "public", "static", "function", "getFieldNames", "(", "$", "type", "=", "BasePeer", "::", "TYPE_PHPNAME", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "type", ",", "SystemSettingsPeer", "::", "$", "fieldNames", ")", ")", "{", "throw", "new", "Pr...
Returns an array of field names. @param string $type The type of fieldnames to return: One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM @return array A list of field names @throws PropelException - i...
[ "Returns", "an", "array", "of", "field", "names", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/BackendBundle/Model/om/BaseSystemSettingsPeer.php#L121-L128
slashworks/control-bundle
src/Slashworks/BackendBundle/Model/om/BaseSystemSettingsPeer.php
BaseSystemSettingsPeer.addSelectColumns
public static function addSelectColumns(Criteria $criteria, $alias = null) { if (null === $alias) { $criteria->addSelectColumn(SystemSettingsPeer::ID); $criteria->addSelectColumn(SystemSettingsPeer::KEY); $criteria->addSelectColumn(SystemSettingsPeer::VALUE); } el...
php
public static function addSelectColumns(Criteria $criteria, $alias = null) { if (null === $alias) { $criteria->addSelectColumn(SystemSettingsPeer::ID); $criteria->addSelectColumn(SystemSettingsPeer::KEY); $criteria->addSelectColumn(SystemSettingsPeer::VALUE); } el...
[ "public", "static", "function", "addSelectColumns", "(", "Criteria", "$", "criteria", ",", "$", "alias", "=", "null", ")", "{", "if", "(", "null", "===", "$", "alias", ")", "{", "$", "criteria", "->", "addSelectColumn", "(", "SystemSettingsPeer", "::", "ID...
Add all the columns needed to create a new object. Note: any columns that were marked with lazyLoad="true" in the XML schema will not be added to the select list and only loaded on demand. @param Criteria $criteria object containing the columns to add. @param string $alias optional table alias @throws ...
[ "Add", "all", "the", "columns", "needed", "to", "create", "a", "new", "object", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/BackendBundle/Model/om/BaseSystemSettingsPeer.php#L159-L170
slashworks/control-bundle
src/Slashworks/BackendBundle/Model/om/BaseSystemSettingsPeer.php
BaseSystemSettingsPeer.getInstanceFromPool
public static function getInstanceFromPool($key) { if (Propel::isInstancePoolingEnabled()) { if (isset(SystemSettingsPeer::$instances[$key])) { return SystemSettingsPeer::$instances[$key]; } } return null; // just to be explicit }
php
public static function getInstanceFromPool($key) { if (Propel::isInstancePoolingEnabled()) { if (isset(SystemSettingsPeer::$instances[$key])) { return SystemSettingsPeer::$instances[$key]; } } return null; // just to be explicit }
[ "public", "static", "function", "getInstanceFromPool", "(", "$", "key", ")", "{", "if", "(", "Propel", "::", "isInstancePoolingEnabled", "(", ")", ")", "{", "if", "(", "isset", "(", "SystemSettingsPeer", "::", "$", "instances", "[", "$", "key", "]", ")", ...
Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. For tables with a single-column primary key, that simple pkey value will be returned. For tables with a multi-column primary key, a serialize()d version of the primary key will be returne...
[ "Retrieves", "a", "string", "version", "of", "the", "primary", "key", "from", "the", "DB", "resultset", "row", "that", "can", "be", "used", "to", "uniquely", "identify", "a", "row", "in", "this", "table", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/BackendBundle/Model/om/BaseSystemSettingsPeer.php#L341-L350
slashworks/control-bundle
src/Slashworks/BackendBundle/Model/om/BaseSystemSettingsPeer.php
BaseSystemSettingsPeer.buildTableMap
public static function buildTableMap() { $dbMap = Propel::getDatabaseMap(BaseSystemSettingsPeer::DATABASE_NAME); if (!$dbMap->hasTable(BaseSystemSettingsPeer::TABLE_NAME)) { $dbMap->addTableObject(new \Slashworks\BackendBundle\Model\map\SystemSettingsTableMap()); } }
php
public static function buildTableMap() { $dbMap = Propel::getDatabaseMap(BaseSystemSettingsPeer::DATABASE_NAME); if (!$dbMap->hasTable(BaseSystemSettingsPeer::TABLE_NAME)) { $dbMap->addTableObject(new \Slashworks\BackendBundle\Model\map\SystemSettingsTableMap()); } }
[ "public", "static", "function", "buildTableMap", "(", ")", "{", "$", "dbMap", "=", "Propel", "::", "getDatabaseMap", "(", "BaseSystemSettingsPeer", "::", "DATABASE_NAME", ")", ";", "if", "(", "!", "$", "dbMap", "->", "hasTable", "(", "BaseSystemSettingsPeer", ...
Add a TableMap instance to the database for this peer class.
[ "Add", "a", "TableMap", "instance", "to", "the", "database", "for", "this", "peer", "class", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/BackendBundle/Model/om/BaseSystemSettingsPeer.php#L484-L490
slashworks/control-bundle
src/Slashworks/BackendBundle/Model/om/BaseSystemSettingsPeer.php
BaseSystemSettingsPeer.doUpdate
public static function doUpdate($values, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(SystemSettingsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } $selectCriteria = new Criteria(SystemSettingsPeer::DATABASE_NAME); if ($values instanceof ...
php
public static function doUpdate($values, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(SystemSettingsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } $selectCriteria = new Criteria(SystemSettingsPeer::DATABASE_NAME); if ($values instanceof ...
[ "public", "static", "function", "doUpdate", "(", "$", "values", ",", "PropelPDO", "$", "con", "=", "null", ")", "{", "if", "(", "$", "con", "===", "null", ")", "{", "$", "con", "=", "Propel", "::", "getConnection", "(", "SystemSettingsPeer", "::", "DAT...
Performs an UPDATE on the database, given a SystemSettings or Criteria object. @param mixed $values Criteria or SystemSettings object containing data that is used to create the UPDATE statement. @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transa...
[ "Performs", "an", "UPDATE", "on", "the", "database", "given", "a", "SystemSettings", "or", "Criteria", "object", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/BackendBundle/Model/om/BaseSystemSettingsPeer.php#L555-L583
neos/doctools
Classes/Domain/Service/EelHelperClassParser.php
EelHelperClassParser.parseTitle
protected function parseTitle() { if (($registeredName = array_search($this->className, $this->defaultContextSettings)) !== false) { return $registeredName; } elseif (preg_match('/\\\\([^\\\\]*)Helper$/', $this->className, $matches)) { return $matches[1]; } r...
php
protected function parseTitle() { if (($registeredName = array_search($this->className, $this->defaultContextSettings)) !== false) { return $registeredName; } elseif (preg_match('/\\\\([^\\\\]*)Helper$/', $this->className, $matches)) { return $matches[1]; } r...
[ "protected", "function", "parseTitle", "(", ")", "{", "if", "(", "(", "$", "registeredName", "=", "array_search", "(", "$", "this", "->", "className", ",", "$", "this", "->", "defaultContextSettings", ")", ")", "!==", "false", ")", "{", "return", "$", "r...
Get the title from the Eel helper class name @return string
[ "Get", "the", "title", "from", "the", "Eel", "helper", "class", "name" ]
train
https://github.com/neos/doctools/blob/726981245a8d59319ee594a582f80a30256df98b/Classes/Domain/Service/EelHelperClassParser.php#L34-L43
neos/doctools
Classes/Domain/Service/EelHelperClassParser.php
EelHelperClassParser.parseDescription
protected function parseDescription() { $description = $this->classReflection->getDescription() . chr(10) . chr(10); $description .= 'Implemented in: ``' . $this->className . '``' . chr(10) . chr(10); $helperName = $this->parseTitle(); $helperInstance = new $this->className(); ...
php
protected function parseDescription() { $description = $this->classReflection->getDescription() . chr(10) . chr(10); $description .= 'Implemented in: ``' . $this->className . '``' . chr(10) . chr(10); $helperName = $this->parseTitle(); $helperInstance = new $this->className(); ...
[ "protected", "function", "parseDescription", "(", ")", "{", "$", "description", "=", "$", "this", "->", "classReflection", "->", "getDescription", "(", ")", ".", "chr", "(", "10", ")", ".", "chr", "(", "10", ")", ";", "$", "description", ".=", "'Implemen...
Iterate over all methods in the helper class @return string
[ "Iterate", "over", "all", "methods", "in", "the", "helper", "class" ]
train
https://github.com/neos/doctools/blob/726981245a8d59319ee594a582f80a30256df98b/Classes/Domain/Service/EelHelperClassParser.php#L50-L68
xinix-technology/norm
src/Norm/Connection/OCIConnection.php
OCIConnection.prepareInit
protected function prepareInit() { $stid = oci_parse($this->raw, "ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'"); oci_execute($stid); oci_free_statement($stid); $stid = oci_parse($this->raw, "ALTER SESSION SET NLS_SORT = BINARY_CI"); oci_execute($stid); ...
php
protected function prepareInit() { $stid = oci_parse($this->raw, "ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'"); oci_execute($stid); oci_free_statement($stid); $stid = oci_parse($this->raw, "ALTER SESSION SET NLS_SORT = BINARY_CI"); oci_execute($stid); ...
[ "protected", "function", "prepareInit", "(", ")", "{", "$", "stid", "=", "oci_parse", "(", "$", "this", "->", "raw", ",", "\"ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'\"", ")", ";", "oci_execute", "(", "$", "stid", ")", ";", "oci_free_statement...
Preparing initialization of connection @return void
[ "Preparing", "initialization", "of", "connection" ]
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection/OCIConnection.php#L72-L85
xinix-technology/norm
src/Norm/Connection/OCIConnection.php
OCIConnection.query
public function query($collection, array $criteria = array()) { $collection = $this->factory($collection); return new Cursor($collection,$criteria); }
php
public function query($collection, array $criteria = array()) { $collection = $this->factory($collection); return new Cursor($collection,$criteria); }
[ "public", "function", "query", "(", "$", "collection", ",", "array", "$", "criteria", "=", "array", "(", ")", ")", "{", "$", "collection", "=", "$", "this", "->", "factory", "(", "$", "collection", ")", ";", "return", "new", "Cursor", "(", "$", "coll...
{@inheritDoc}
[ "{" ]
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection/OCIConnection.php#L90-L94
xinix-technology/norm
src/Norm/Connection/OCIConnection.php
OCIConnection.persist
public function persist($collection, array $document) { if ($collection instanceof Collection) { $collectionName = $collection->getName(); } else { $collectionName = $collection; $collection = static::factory($collection); } $dat...
php
public function persist($collection, array $document) { if ($collection instanceof Collection) { $collectionName = $collection->getName(); } else { $collectionName = $collection; $collection = static::factory($collection); } $dat...
[ "public", "function", "persist", "(", "$", "collection", ",", "array", "$", "document", ")", "{", "if", "(", "$", "collection", "instanceof", "Collection", ")", "{", "$", "collectionName", "=", "$", "collection", "->", "getName", "(", ")", ";", "}", "els...
Sync data to database. If it's new data, we insert it as new document, otherwise, if the document exists, we just update it. @param Collection $collection @param Model $model @return bool
[ "Sync", "data", "to", "database", ".", "If", "it", "s", "new", "data", "we", "insert", "it", "as", "new", "document", "otherwise", "if", "the", "document", "exists", "we", "just", "update", "it", "." ]
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection/OCIConnection.php#L104-L136
xinix-technology/norm
src/Norm/Connection/OCIConnection.php
OCIConnection.remove
public function remove($collection,$criteria = null) { if ($collection instanceof Collection) { $collectionName = $collection->getName(); } else { $collectionName = $collection; $collection = static::factory($collection); } if($criteria instanceof...
php
public function remove($collection,$criteria = null) { if ($collection instanceof Collection) { $collectionName = $collection->getName(); } else { $collectionName = $collection; $collection = static::factory($collection); } if($criteria instanceof...
[ "public", "function", "remove", "(", "$", "collection", ",", "$", "criteria", "=", "null", ")", "{", "if", "(", "$", "collection", "instanceof", "Collection", ")", "{", "$", "collectionName", "=", "$", "collection", "->", "getName", "(", ")", ";", "}", ...
{@inheritDoc}
[ "{" ]
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection/OCIConnection.php#L141-L164
xinix-technology/norm
src/Norm/Connection/OCIConnection.php
OCIConnection.insert
public function insert($collectionName, $data) { $id = 0; $sql = $this->dialect->grammarInsert($collectionName, $data); $stid = oci_parse($this->raw, $sql); //Fixme : problem from other oracle dialect on method insert oci_bind_by_name($stid, ":id", $id,-1,SQLT_INT); ...
php
public function insert($collectionName, $data) { $id = 0; $sql = $this->dialect->grammarInsert($collectionName, $data); $stid = oci_parse($this->raw, $sql); //Fixme : problem from other oracle dialect on method insert oci_bind_by_name($stid, ":id", $id,-1,SQLT_INT); ...
[ "public", "function", "insert", "(", "$", "collectionName", ",", "$", "data", ")", "{", "$", "id", "=", "0", ";", "$", "sql", "=", "$", "this", "->", "dialect", "->", "grammarInsert", "(", "$", "collectionName", ",", "$", "data", ")", ";", "$", "st...
Perform insert new document to database. @param string $collectionName @param mixed $data @return bool
[ "Perform", "insert", "new", "document", "to", "database", "." ]
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection/OCIConnection.php#L174-L193
xinix-technology/norm
src/Norm/Connection/OCIConnection.php
OCIConnection.update
public function update($collectionName, $data) { $sql = $this->dialect->grammarUpdate($collectionName, $data); $stid = oci_parse($this->raw, $sql); oci_bind_by_name($stid, ":id", $data['id']); foreach ($data as $key => $value) { oci_bind_by_name($stid, ":".$key, $data[...
php
public function update($collectionName, $data) { $sql = $this->dialect->grammarUpdate($collectionName, $data); $stid = oci_parse($this->raw, $sql); oci_bind_by_name($stid, ":id", $data['id']); foreach ($data as $key => $value) { oci_bind_by_name($stid, ":".$key, $data[...
[ "public", "function", "update", "(", "$", "collectionName", ",", "$", "data", ")", "{", "$", "sql", "=", "$", "this", "->", "dialect", "->", "grammarUpdate", "(", "$", "collectionName", ",", "$", "data", ")", ";", "$", "stid", "=", "oci_parse", "(", ...
Perform update to a document. @param string $collectionName @param mixed $data @return bool
[ "Perform", "update", "to", "a", "document", "." ]
train
https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Connection/OCIConnection.php#L203-L220
PortaText/php-sdk
src/PortaText/Command/Api/Acl.php
Acl.getBody
protected function getBody($method) { if ($method === "get") { return parent::getBody($method); } $acls = array(); foreach ($this->getArguments() as $value) { $acls[] = $value; } return json_encode(array("acl" => $acls)); }
php
protected function getBody($method) { if ($method === "get") { return parent::getBody($method); } $acls = array(); foreach ($this->getArguments() as $value) { $acls[] = $value; } return json_encode(array("acl" => $acls)); }
[ "protected", "function", "getBody", "(", "$", "method", ")", "{", "if", "(", "$", "method", "===", "\"get\"", ")", "{", "return", "parent", "::", "getBody", "(", "$", "method", ")", ";", "}", "$", "acls", "=", "array", "(", ")", ";", "foreach", "("...
Returns the body for this endpoint. @param string $method Method for this command. @return string
[ "Returns", "the", "body", "for", "this", "endpoint", "." ]
train
https://github.com/PortaText/php-sdk/blob/dbe04ef043db5b251953f9de57aa4d0f1785dfcc/src/PortaText/Command/Api/Acl.php#L44-L54
AydinHassan/cli-md-renderer
src/Renderer/ListBlockRenderer.php
ListBlockRenderer.render
public function render(AbstractBlock $block, CliRenderer $renderer) { if (!($block instanceof ListBlock)) { throw new \InvalidArgumentException(sprintf('Incompatible block type: "%s"', get_class($block))); } return $renderer->renderBlocks($block->children()); }
php
public function render(AbstractBlock $block, CliRenderer $renderer) { if (!($block instanceof ListBlock)) { throw new \InvalidArgumentException(sprintf('Incompatible block type: "%s"', get_class($block))); } return $renderer->renderBlocks($block->children()); }
[ "public", "function", "render", "(", "AbstractBlock", "$", "block", ",", "CliRenderer", "$", "renderer", ")", "{", "if", "(", "!", "(", "$", "block", "instanceof", "ListBlock", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "sprintf", ...
@param AbstractBlock $block @param CliRenderer $renderer @return string
[ "@param", "AbstractBlock", "$block", "@param", "CliRenderer", "$renderer" ]
train
https://github.com/AydinHassan/cli-md-renderer/blob/521f9ace2aeadd58bf8a3910704be8360f5bd7b2/src/Renderer/ListBlockRenderer.php#L23-L30
egeloen/IvorySerializerBundle
DependencyInjection/Compiler/RegisterCachePoolPass.php
RegisterCachePoolPass.process
public function process(ContainerBuilder $container) { if (!$container->hasDefinition($classMetadataFactoryService = 'ivory.serializer.mapping.factory')) { return; } $classMetadataFactory = $container->getDefinition($classMetadataFactoryService); if ($classMetadataFacto...
php
public function process(ContainerBuilder $container) { if (!$container->hasDefinition($classMetadataFactoryService = 'ivory.serializer.mapping.factory')) { return; } $classMetadataFactory = $container->getDefinition($classMetadataFactoryService); if ($classMetadataFacto...
[ "public", "function", "process", "(", "ContainerBuilder", "$", "container", ")", "{", "if", "(", "!", "$", "container", "->", "hasDefinition", "(", "$", "classMetadataFactoryService", "=", "'ivory.serializer.mapping.factory'", ")", ")", "{", "return", ";", "}", ...
{@inheritdoc}
[ "{" ]
train
https://github.com/egeloen/IvorySerializerBundle/blob/a2bdd912bf715c61b823cf7257ee232d5c823dd3/DependencyInjection/Compiler/RegisterCachePoolPass.php#L30-L60
Kylob/Bootstrap
src/Table.php
Table.open
public function open($vars = '', $caption = '') { $vars = $this->values($vars); if (isset($vars['class'])) { $vars['class'] = $this->prefixClasses('table', array('responsive', 'bordered', 'striped', 'hover', 'condensed'), $vars['class']); } return parent::open($vars, $ca...
php
public function open($vars = '', $caption = '') { $vars = $this->values($vars); if (isset($vars['class'])) { $vars['class'] = $this->prefixClasses('table', array('responsive', 'bordered', 'striped', 'hover', 'condensed'), $vars['class']); } return parent::open($vars, $ca...
[ "public", "function", "open", "(", "$", "vars", "=", "''", ",", "$", "caption", "=", "''", ")", "{", "$", "vars", "=", "$", "this", "->", "values", "(", "$", "vars", ")", ";", "if", "(", "isset", "(", "$", "vars", "[", "'class'", "]", ")", ")...
Create a ``<table>``. @param string|array $vars ``<table>`` attributes. Any '**responsive**', '**bordered**', '**striped**', '**hover**', and/or '**condensed**' class will be prefixed with a '**table-...**', and include the '**table**' class as well. @param string $caption Table ``<caption>``. @return strin...
[ "Create", "a", "<table", ">", "." ]
train
https://github.com/Kylob/Bootstrap/blob/0d7677a90656fbc461eabb5512ab16f9d5f728c6/src/Table.php#L30-L38
inpsyde/inpsyde-filter
src/AbstractFilter.php
AbstractFilter.set_options
protected function set_options( array $options = [ ] ) { foreach ( $options as $key => $value ) { if ( ! array_key_exists( $key, $this->options ) ) { throw new \InvalidArgumentException( sprintf( 'The option "%1$s" does not have a matching option[%1$s] array key', $key ), 1.0 ); continue; ...
php
protected function set_options( array $options = [ ] ) { foreach ( $options as $key => $value ) { if ( ! array_key_exists( $key, $this->options ) ) { throw new \InvalidArgumentException( sprintf( 'The option "%1$s" does not have a matching option[%1$s] array key', $key ), 1.0 ); continue; ...
[ "protected", "function", "set_options", "(", "array", "$", "options", "=", "[", "]", ")", "{", "foreach", "(", "$", "options", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "key", ",", "$", "this", "-...
Setting the given options from constructor. @param array $options @throws \InvalidArgumentException if the given option is not available to overwrite.
[ "Setting", "the", "given", "options", "from", "constructor", "." ]
train
https://github.com/inpsyde/inpsyde-filter/blob/777a6208ea4dfbeed89e6d0712a35dc25eab498b/src/AbstractFilter.php#L34-L47
egeloen/IvorySerializerBundle
Type/FormType.php
FormType.convert
public function convert($data, TypeMetadataInterface $type, ContextInterface $context) { if ($context->getDirection() === Direction::DESERIALIZATION) { throw new \RuntimeException(sprintf('Deserializing a "%s" is not supported.', Form::class)); } return $context->getVisitor()->v...
php
public function convert($data, TypeMetadataInterface $type, ContextInterface $context) { if ($context->getDirection() === Direction::DESERIALIZATION) { throw new \RuntimeException(sprintf('Deserializing a "%s" is not supported.', Form::class)); } return $context->getVisitor()->v...
[ "public", "function", "convert", "(", "$", "data", ",", "TypeMetadataInterface", "$", "type", ",", "ContextInterface", "$", "context", ")", "{", "if", "(", "$", "context", "->", "getDirection", "(", ")", "===", "Direction", "::", "DESERIALIZATION", ")", "{",...
{@inheritdoc}
[ "{" ]
train
https://github.com/egeloen/IvorySerializerBundle/blob/a2bdd912bf715c61b823cf7257ee232d5c823dd3/Type/FormType.php#L28-L39
egeloen/IvorySerializerBundle
Type/FormType.php
FormType.serializeForm
private function serializeForm(Form $form) { $result = $children = []; $errors = iterator_to_array($form->getErrors()); foreach ($form as $child) { if ($child instanceof Form) { $children[$child->getName()] = $this->serializeForm($child); } } ...
php
private function serializeForm(Form $form) { $result = $children = []; $errors = iterator_to_array($form->getErrors()); foreach ($form as $child) { if ($child instanceof Form) { $children[$child->getName()] = $this->serializeForm($child); } } ...
[ "private", "function", "serializeForm", "(", "Form", "$", "form", ")", "{", "$", "result", "=", "$", "children", "=", "[", "]", ";", "$", "errors", "=", "iterator_to_array", "(", "$", "form", "->", "getErrors", "(", ")", ")", ";", "foreach", "(", "$"...
@param Form $form @return mixed[]
[ "@param", "Form", "$form" ]
train
https://github.com/egeloen/IvorySerializerBundle/blob/a2bdd912bf715c61b823cf7257ee232d5c823dd3/Type/FormType.php#L46-L66
AydinHassan/cli-md-renderer
src/InlineRenderer/CodeRenderer.php
CodeRenderer.render
public function render(AbstractInline $inline, CliRenderer $renderer) { if (!($inline instanceof Code)) { throw new \InvalidArgumentException(sprintf('Incompatible inline type: "%s"', get_class($inline))); } return $renderer->style($inline->getContent(), 'yellow'); }
php
public function render(AbstractInline $inline, CliRenderer $renderer) { if (!($inline instanceof Code)) { throw new \InvalidArgumentException(sprintf('Incompatible inline type: "%s"', get_class($inline))); } return $renderer->style($inline->getContent(), 'yellow'); }
[ "public", "function", "render", "(", "AbstractInline", "$", "inline", ",", "CliRenderer", "$", "renderer", ")", "{", "if", "(", "!", "(", "$", "inline", "instanceof", "Code", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "sprintf", ...
@param AbstractInline $inline @param CliRenderer $renderer @return string
[ "@param", "AbstractInline", "$inline", "@param", "CliRenderer", "$renderer" ]
train
https://github.com/AydinHassan/cli-md-renderer/blob/521f9ace2aeadd58bf8a3910704be8360f5bd7b2/src/InlineRenderer/CodeRenderer.php#L23-L30
slashworks/control-bundle
src/Slashworks/AppBundle/Controller/AppController.php
AppController.check4Client
public function check4Client($iCustomerId) { if ($this->get('security.context')->isGranted('ROLE_ADMIN')) { return true; } else { $oUser = $this->getUser(); if (empty($oUser)) { return false; } ...
php
public function check4Client($iCustomerId) { if ($this->get('security.context')->isGranted('ROLE_ADMIN')) { return true; } else { $oUser = $this->getUser(); if (empty($oUser)) { return false; } ...
[ "public", "function", "check4Client", "(", "$", "iCustomerId", ")", "{", "if", "(", "$", "this", "->", "get", "(", "'security.context'", ")", "->", "isGranted", "(", "'ROLE_ADMIN'", ")", ")", "{", "return", "true", ";", "}", "else", "{", "$", "oUser", ...
Check if user has access to customer @param int $iCustomerId @return bool
[ "Check", "if", "user", "has", "access", "to", "customer" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Controller/AppController.php#L59-L75
webtown-php/KunstmaanExtensionBundle
src/Translation/Extraction/File/KunstmaanExtractor.php
KunstmaanExtractor.visitFile
public function visitFile(\SplFileInfo $file, MessageCatalogue $catalogue) { if ($file->getExtension() != 'yml') { return; } $path = strtr($file->getRealPath(), DIRECTORY_SEPARATOR, '/'); if (strpos($path, 'Resources/config/pageparts') === false) { return; ...
php
public function visitFile(\SplFileInfo $file, MessageCatalogue $catalogue) { if ($file->getExtension() != 'yml') { return; } $path = strtr($file->getRealPath(), DIRECTORY_SEPARATOR, '/'); if (strpos($path, 'Resources/config/pageparts') === false) { return; ...
[ "public", "function", "visitFile", "(", "\\", "SplFileInfo", "$", "file", ",", "MessageCatalogue", "$", "catalogue", ")", "{", "if", "(", "$", "file", "->", "getExtension", "(", ")", "!=", "'yml'", ")", "{", "return", ";", "}", "$", "path", "=", "strtr...
Collect the pagepart names! @param \SplFileInfo $file @param MessageCatalogue $catalogue
[ "Collect", "the", "pagepart", "names!" ]
train
https://github.com/webtown-php/KunstmaanExtensionBundle/blob/86c656c131295fe1f3f7694fd4da1e5e454076b9/src/Translation/Extraction/File/KunstmaanExtractor.php#L229-L249
steeffeen/FancyManiaLinks
FML/XmlRpc/UIProperties.php
UIProperties.setChatOffset
public function setChatOffset($offsetX, $offsetY) { $offset = array((float)$offsetX, (float)$offsetY); $this->setProperty($this->chatProperties, "offset", implode(" ", $offset)); return $this; }
php
public function setChatOffset($offsetX, $offsetY) { $offset = array((float)$offsetX, (float)$offsetY); $this->setProperty($this->chatProperties, "offset", implode(" ", $offset)); return $this; }
[ "public", "function", "setChatOffset", "(", "$", "offsetX", ",", "$", "offsetY", ")", "{", "$", "offset", "=", "array", "(", "(", "float", ")", "$", "offsetX", ",", "(", "float", ")", "$", "offsetY", ")", ";", "$", "this", "->", "setProperty", "(", ...
Set the chat offset @api @param float $offsetX X offset @param float $offsetY Y offset @return static
[ "Set", "the", "chat", "offset" ]
train
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/UIProperties.php#L104-L109
steeffeen/FancyManiaLinks
FML/XmlRpc/UIProperties.php
UIProperties.setMapInfoPosition
public function setMapInfoPosition($positionX, $positionY, $positionZ = null) { $this->setPositionProperty($this->mapInfoProperties, $positionX, $positionY, $positionZ); return $this; }
php
public function setMapInfoPosition($positionX, $positionY, $positionZ = null) { $this->setPositionProperty($this->mapInfoProperties, $positionX, $positionY, $positionZ); return $this; }
[ "public", "function", "setMapInfoPosition", "(", "$", "positionX", ",", "$", "positionY", ",", "$", "positionZ", "=", "null", ")", "{", "$", "this", "->", "setPositionProperty", "(", "$", "this", "->", "mapInfoProperties", ",", "$", "positionX", ",", "$", ...
Set the map info position @api @param float $positionX X position @param float $positionY Y position @param float $positionZ (optional) Z position (Z-index) @return static
[ "Set", "the", "map", "info", "position" ]
train
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/UIProperties.php#L203-L207
steeffeen/FancyManiaLinks
FML/XmlRpc/UIProperties.php
UIProperties.setCountdownPosition
public function setCountdownPosition($positionX, $positionY, $positionZ = null) { $this->setPositionProperty($this->countdownProperties, $positionX, $positionY, $positionZ); return $this; }
php
public function setCountdownPosition($positionX, $positionY, $positionZ = null) { $this->setPositionProperty($this->countdownProperties, $positionX, $positionY, $positionZ); return $this; }
[ "public", "function", "setCountdownPosition", "(", "$", "positionX", ",", "$", "positionY", ",", "$", "positionZ", "=", "null", ")", "{", "$", "this", "->", "setPositionProperty", "(", "$", "this", "->", "countdownProperties", ",", "$", "positionX", ",", "$"...
Set the countdown position @api @param float $positionX X position @param float $positionY Y position @param float $positionZ (optional) Z position (Z-index) @return static
[ "Set", "the", "countdown", "position" ]
train
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/UIProperties.php#L253-L257
steeffeen/FancyManiaLinks
FML/XmlRpc/UIProperties.php
UIProperties.renderStandalone
public function renderStandalone() { $domDocument = new \DOMDocument("1.0", "utf-8"); $domDocument->xmlStandalone = true; $domElement = $domDocument->createElement("ui_properties"); $domDocument->appendChild($domElement); $allProperties = $this->getProperties...
php
public function renderStandalone() { $domDocument = new \DOMDocument("1.0", "utf-8"); $domDocument->xmlStandalone = true; $domElement = $domDocument->createElement("ui_properties"); $domDocument->appendChild($domElement); $allProperties = $this->getProperties...
[ "public", "function", "renderStandalone", "(", ")", "{", "$", "domDocument", "=", "new", "\\", "DOMDocument", "(", "\"1.0\"", ",", "\"utf-8\"", ")", ";", "$", "domDocument", "->", "xmlStandalone", "=", "true", ";", "$", "domElement", "=", "$", "domDocument",...
Render the UI Properties standalone @return \DOMDocument
[ "Render", "the", "UI", "Properties", "standalone" ]
train
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/UIProperties.php#L336-L360
steeffeen/FancyManiaLinks
FML/XmlRpc/UIProperties.php
UIProperties.getProperties
protected function getProperties() { return array( "chat" => $this->chatProperties, "chat_avatar" => $this->chatAvatarProperties, "map_info" => $this->mapInfoProperties, "countdown" => $this->countdownProperties, "go" => $this->goProperties, ...
php
protected function getProperties() { return array( "chat" => $this->chatProperties, "chat_avatar" => $this->chatAvatarProperties, "map_info" => $this->mapInfoProperties, "countdown" => $this->countdownProperties, "go" => $this->goProperties, ...
[ "protected", "function", "getProperties", "(", ")", "{", "return", "array", "(", "\"chat\"", "=>", "$", "this", "->", "chatProperties", ",", "\"chat_avatar\"", "=>", "$", "this", "->", "chatAvatarProperties", ",", "\"map_info\"", "=>", "$", "this", "->", "mapI...
Get associative array of all properties @return array
[ "Get", "associative", "array", "of", "all", "properties" ]
train
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/UIProperties.php#L378-L389
steeffeen/FancyManiaLinks
FML/XmlRpc/UIProperties.php
UIProperties.setPositionProperty
protected function setPositionProperty(array &$properties, $positionX, $positionY, $positionZ = null) { $position = array((float)$positionX, (float)$positionY); if ($positionZ) { array_push($position, (float)$positionZ); } $this->setProperty($properties, "pos", implode(" ...
php
protected function setPositionProperty(array &$properties, $positionX, $positionY, $positionZ = null) { $position = array((float)$positionX, (float)$positionY); if ($positionZ) { array_push($position, (float)$positionZ); } $this->setProperty($properties, "pos", implode(" ...
[ "protected", "function", "setPositionProperty", "(", "array", "&", "$", "properties", ",", "$", "positionX", ",", "$", "positionY", ",", "$", "positionZ", "=", "null", ")", "{", "$", "position", "=", "array", "(", "(", "float", ")", "$", "positionX", ","...
Set the Position property value @param array $properties Properties array @param float $positionX X position @param float $positionY Y position @param float $positionZ (optional) Z position (Z-index) @return static
[ "Set", "the", "Position", "property", "value" ]
train
https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/UIProperties.php#L461-L469
php-rise/rise
src/Router/Scope.php
Scope.createScope
public function createScope($closure) { $newScope = (new static($this->request, $this->result, $this->urlGenerator)); $newScope->setupParent( $this->prefix, $this->prefixMatched, $this->requestPathOffset, $this->params ); $newScope->use($this->middlewares); // Must add middlewares before adding name...
php
public function createScope($closure) { $newScope = (new static($this->request, $this->result, $this->urlGenerator)); $newScope->setupParent( $this->prefix, $this->prefixMatched, $this->requestPathOffset, $this->params ); $newScope->use($this->middlewares); // Must add middlewares before adding name...
[ "public", "function", "createScope", "(", "$", "closure", ")", "{", "$", "newScope", "=", "(", "new", "static", "(", "$", "this", "->", "request", ",", "$", "this", "->", "result", ",", "$", "this", "->", "urlGenerator", ")", ")", ";", "$", "newScope...
Create a child scope. @param callable $closure
[ "Create", "a", "child", "scope", "." ]
train
https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Router/Scope.php#L88-L99
php-rise/rise
src/Router/Scope.php
Scope.prefix
public function prefix($prefix) { // Reset values before matching. $this->prefix = $this->parentPrefix; $this->requestPathOffset = $this->parentRequestPathOffset; if ($this->parentPrefixMatched) { $this->prefixMatched = $this->parentPrefixMatched; } if (!$this->result->hasHandler() && $this->prefixMatch...
php
public function prefix($prefix) { // Reset values before matching. $this->prefix = $this->parentPrefix; $this->requestPathOffset = $this->parentRequestPathOffset; if ($this->parentPrefixMatched) { $this->prefixMatched = $this->parentPrefixMatched; } if (!$this->result->hasHandler() && $this->prefixMatch...
[ "public", "function", "prefix", "(", "$", "prefix", ")", "{", "// Reset values before matching.", "$", "this", "->", "prefix", "=", "$", "this", "->", "parentPrefix", ";", "$", "this", "->", "requestPathOffset", "=", "$", "this", "->", "parentRequestPathOffset",...
Set a common path prefix for all routes. @param string $prefix @return self
[ "Set", "a", "common", "path", "prefix", "for", "all", "routes", "." ]
train
https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Router/Scope.php#L107-L122
php-rise/rise
src/Router/Scope.php
Scope.use
public function use($middlewares) { $middlewares = (array)$middlewares; if ($this->namespace) { foreach ($middlewares as &$middleware) { $middleware = $this->namespace . $middleware; } } $this->middlewares = array_merge($this->middlewares, (array)$middlewares); return $this; }
php
public function use($middlewares) { $middlewares = (array)$middlewares; if ($this->namespace) { foreach ($middlewares as &$middleware) { $middleware = $this->namespace . $middleware; } } $this->middlewares = array_merge($this->middlewares, (array)$middlewares); return $this; }
[ "public", "function", "use", "(", "$", "middlewares", ")", "{", "$", "middlewares", "=", "(", "array", ")", "$", "middlewares", ";", "if", "(", "$", "this", "->", "namespace", ")", "{", "foreach", "(", "$", "middlewares", "as", "&", "$", "middleware", ...
Add middlewares. @param string[]|string $middlewares @return self
[ "Add", "middlewares", "." ]
train
https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Router/Scope.php#L145-L157
php-rise/rise
src/Router/Scope.php
Scope.on
public function on($method, $path, $handler, $name = '') { if (!$this->result->hasHandler() && $this->prefixMatched && $this->request->isMethod($method) ) { if ($this->matchPartial($path, true)) { $handlers = (array)$handler; if ($this->namespace) { foreach ($handlers as &$handler) { $h...
php
public function on($method, $path, $handler, $name = '') { if (!$this->result->hasHandler() && $this->prefixMatched && $this->request->isMethod($method) ) { if ($this->matchPartial($path, true)) { $handlers = (array)$handler; if ($this->namespace) { foreach ($handlers as &$handler) { $h...
[ "public", "function", "on", "(", "$", "method", ",", "$", "path", ",", "$", "handler", ",", "$", "name", "=", "''", ")", "{", "if", "(", "!", "$", "this", "->", "result", "->", "hasHandler", "(", ")", "&&", "$", "this", "->", "prefixMatched", "&&...
Add a route. @param string $method @param string $path @param string|string[] $handler @param string $name Route name. @return self
[ "Add", "a", "route", "." ]
train
https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Router/Scope.php#L168-L197
php-rise/rise
src/Router/Scope.php
Scope.setupParent
public function setupParent($prefix, $prefixMatched, $requestPathOffset, $params) { $this->prefix = $prefix; $this->parentPrefix = $prefix; $this->prefixMatched = $prefixMatched; $this->parentPrefixMatched = $prefixMatched; $this->requestPathOffset = $requestPathOffset; $this->parentRequestPathOffset = $req...
php
public function setupParent($prefix, $prefixMatched, $requestPathOffset, $params) { $this->prefix = $prefix; $this->parentPrefix = $prefix; $this->prefixMatched = $prefixMatched; $this->parentPrefixMatched = $prefixMatched; $this->requestPathOffset = $requestPathOffset; $this->parentRequestPathOffset = $req...
[ "public", "function", "setupParent", "(", "$", "prefix", ",", "$", "prefixMatched", ",", "$", "requestPathOffset", ",", "$", "params", ")", "{", "$", "this", "->", "prefix", "=", "$", "prefix", ";", "$", "this", "->", "parentPrefix", "=", "$", "prefix", ...
Inherit data from parent scope. @param string $prefix @param bool $prefixMatched @param int $requestPathOffset @param array $params
[ "Inherit", "data", "from", "parent", "scope", "." ]
train
https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Router/Scope.php#L245-L253
php-rise/rise
src/Router/Scope.php
Scope.matchPartial
protected function matchPartial($routePathPartial, $toEnd = false) { $result = false; $numOfRouteMatches = preg_match_all( self::ROUTE_PARAM_PATTERN, $routePathPartial, $routeMatches, PREG_OFFSET_CAPTURE ); if ($numOfRouteMatches === 0) { // plain string if ($toEnd) { $requestPathPartial = ...
php
protected function matchPartial($routePathPartial, $toEnd = false) { $result = false; $numOfRouteMatches = preg_match_all( self::ROUTE_PARAM_PATTERN, $routePathPartial, $routeMatches, PREG_OFFSET_CAPTURE ); if ($numOfRouteMatches === 0) { // plain string if ($toEnd) { $requestPathPartial = ...
[ "protected", "function", "matchPartial", "(", "$", "routePathPartial", ",", "$", "toEnd", "=", "false", ")", "{", "$", "result", "=", "false", ";", "$", "numOfRouteMatches", "=", "preg_match_all", "(", "self", "::", "ROUTE_PARAM_PATTERN", ",", "$", "routePathP...
Match path partial with request path. This will move the request path offset. @param string $routePathPartial, @param bool $toEnd @return bool
[ "Match", "path", "partial", "with", "request", "path", ".", "This", "will", "move", "the", "request", "path", "offset", "." ]
train
https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Router/Scope.php#L262-L323
Lansoweb/LosReCaptcha
src/Service/ReCaptcha.php
ReCaptcha.getHtml
public function getHtml($name = null) { $host = self::API_SERVER; $langOption = ''; if (isset($this->options['lang']) && ! empty($this->options['lang'])) { $langOption = "?hl={$this->options['lang']}"; } $return = <<<HTML <script type="text/javascript" src="{$h...
php
public function getHtml($name = null) { $host = self::API_SERVER; $langOption = ''; if (isset($this->options['lang']) && ! empty($this->options['lang'])) { $langOption = "?hl={$this->options['lang']}"; } $return = <<<HTML <script type="text/javascript" src="{$h...
[ "public", "function", "getHtml", "(", "$", "name", "=", "null", ")", "{", "$", "host", "=", "self", "::", "API_SERVER", ";", "$", "langOption", "=", "''", ";", "if", "(", "isset", "(", "$", "this", "->", "options", "[", "'lang'", "]", ")", "&&", ...
Get the HTML code for the captcha This method uses the public key to fetch a recaptcha form. @param null|string $name Base name for recaptcha form elements @return string @throws \LosReCaptcha\Service\Exception
[ "Get", "the", "HTML", "code", "for", "the", "captcha" ]
train
https://github.com/Lansoweb/LosReCaptcha/blob/8df866995501db087c3850f97fd2b6547632e6ed/src/Service/ReCaptcha.php#L138-L153
Lansoweb/LosReCaptcha
src/Service/ReCaptcha.php
ReCaptcha.query
protected function query($responseField) { $params = new Parameters($this->secretKey, $responseField, $this->ip); return $this->request->send($params); }
php
protected function query($responseField) { $params = new Parameters($this->secretKey, $responseField, $this->ip); return $this->request->send($params); }
[ "protected", "function", "query", "(", "$", "responseField", ")", "{", "$", "params", "=", "new", "Parameters", "(", "$", "this", "->", "secretKey", ",", "$", "responseField", ",", "$", "this", "->", "ip", ")", ";", "return", "$", "this", "->", "reques...
Gets a solution to the verify server @param string $responseField @return \LosReCaptcha\Service\Response @throws \LosReCaptcha\\Service\Exception
[ "Gets", "a", "solution", "to", "the", "verify", "server" ]
train
https://github.com/Lansoweb/LosReCaptcha/blob/8df866995501db087c3850f97fd2b6547632e6ed/src/Service/ReCaptcha.php#L184-L189
yuncms/framework
src/user/controllers/SettingsController.php
SettingsController.actionProfile
public function actionProfile() { $model = UserProfile::findOne(['user_id' => Yii::$app->user->identity->getId()]); if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) { Yii::$app->response->format = Response::FORMAT_JSON; return ActiveForm::validate($...
php
public function actionProfile() { $model = UserProfile::findOne(['user_id' => Yii::$app->user->identity->getId()]); if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) { Yii::$app->response->format = Response::FORMAT_JSON; return ActiveForm::validate($...
[ "public", "function", "actionProfile", "(", ")", "{", "$", "model", "=", "UserProfile", "::", "findOne", "(", "[", "'user_id'", "=>", "Yii", "::", "$", "app", "->", "user", "->", "identity", "->", "getId", "(", ")", "]", ")", ";", "if", "(", "Yii", ...
Shows profile settings form. @return array|string|Response
[ "Shows", "profile", "settings", "form", "." ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/controllers/SettingsController.php#L64-L78
yuncms/framework
src/user/controllers/SettingsController.php
SettingsController.actionAvatar
public function actionAvatar() { $model = new AvatarForm(); if ($model->load(Yii::$app->request->post()) && $model->save()) { Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Your avatar has been updated')); } return $this->render('avatar', [ 'mo...
php
public function actionAvatar() { $model = new AvatarForm(); if ($model->load(Yii::$app->request->post()) && $model->save()) { Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Your avatar has been updated')); } return $this->render('avatar', [ 'mo...
[ "public", "function", "actionAvatar", "(", ")", "{", "$", "model", "=", "new", "AvatarForm", "(", ")", ";", "if", "(", "$", "model", "->", "load", "(", "Yii", "::", "$", "app", "->", "request", "->", "post", "(", ")", ")", "&&", "$", "model", "->...
Show portrait setting form @return \yii\web\Response|string @throws \League\Flysystem\FileExistsException @throws \League\Flysystem\FileNotFoundException @throws \yii\base\ErrorException @throws \yii\base\Exception @throws \yii\base\InvalidConfigException
[ "Show", "portrait", "setting", "form" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/controllers/SettingsController.php#L89-L98
yuncms/framework
src/user/controllers/SettingsController.php
SettingsController.actionAccount
public function actionAccount() { /** @var SettingsForm $model */ $model = new SettingsForm(); if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) { Yii::$app->response->format = Response::FORMAT_JSON; return ActiveForm::validate($model); ...
php
public function actionAccount() { /** @var SettingsForm $model */ $model = new SettingsForm(); if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) { Yii::$app->response->format = Response::FORMAT_JSON; return ActiveForm::validate($model); ...
[ "public", "function", "actionAccount", "(", ")", "{", "/** @var SettingsForm $model */", "$", "model", "=", "new", "SettingsForm", "(", ")", ";", "if", "(", "Yii", "::", "$", "app", "->", "request", "->", "isAjax", "&&", "$", "model", "->", "load", "(", ...
Displays page where user can update account settings (username, email or password). @return array|string|Response
[ "Displays", "page", "where", "user", "can", "update", "account", "settings", "(", "username", "email", "or", "password", ")", "." ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/controllers/SettingsController.php#L104-L119
yuncms/framework
src/user/controllers/SettingsController.php
SettingsController.actionFollowerTag
public function actionFollowerTag() { Yii::$app->response->format = Response::FORMAT_JSON; $tagId = Yii::$app->request->post('tag_id', null); if (($tag = Tag::findOne($tagId)) == null) { throw new NotFoundHttpException (); } else { /** @var \yuncms\user\models...
php
public function actionFollowerTag() { Yii::$app->response->format = Response::FORMAT_JSON; $tagId = Yii::$app->request->post('tag_id', null); if (($tag = Tag::findOne($tagId)) == null) { throw new NotFoundHttpException (); } else { /** @var \yuncms\user\models...
[ "public", "function", "actionFollowerTag", "(", ")", "{", "Yii", "::", "$", "app", "->", "response", "->", "format", "=", "Response", "::", "FORMAT_JSON", ";", "$", "tagId", "=", "Yii", "::", "$", "app", "->", "request", "->", "post", "(", "'tag_id'", ...
关注某tag @return array @throws NotFoundHttpException
[ "关注某tag" ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/controllers/SettingsController.php#L126-L145
yuncms/framework
src/user/controllers/SettingsController.php
SettingsController.actionConfirm
public function actionConfirm($id, $code) { $user = User::findOne($id); if ($user === null || Yii::$app->settings->get('emailChangeStrategy','user') == UserSettings::STRATEGY_INSECURE) { throw new NotFoundHttpException(); } $user->attemptEmailChange($code); return...
php
public function actionConfirm($id, $code) { $user = User::findOne($id); if ($user === null || Yii::$app->settings->get('emailChangeStrategy','user') == UserSettings::STRATEGY_INSECURE) { throw new NotFoundHttpException(); } $user->attemptEmailChange($code); return...
[ "public", "function", "actionConfirm", "(", "$", "id", ",", "$", "code", ")", "{", "$", "user", "=", "User", "::", "findOne", "(", "$", "id", ")", ";", "if", "(", "$", "user", "===", "null", "||", "Yii", "::", "$", "app", "->", "settings", "->", ...
Attempts changing user's email address. @param integer $id @param string $code @return string @throws NotFoundHttpException
[ "Attempts", "changing", "user", "s", "email", "address", "." ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/controllers/SettingsController.php#L156-L164
yuncms/framework
src/user/controllers/SettingsController.php
SettingsController.actionDisconnect
public function actionDisconnect($id) { $account = UserSocialAccount::find()->byId($id)->one(); if ($account === null) { Yii::$app->session->setFlash('success', Yii::t('yuncms', 'Your account have been updated.')); return $this->redirect(['networks']); } if ($...
php
public function actionDisconnect($id) { $account = UserSocialAccount::find()->byId($id)->one(); if ($account === null) { Yii::$app->session->setFlash('success', Yii::t('yuncms', 'Your account have been updated.')); return $this->redirect(['networks']); } if ($...
[ "public", "function", "actionDisconnect", "(", "$", "id", ")", "{", "$", "account", "=", "UserSocialAccount", "::", "find", "(", ")", "->", "byId", "(", "$", "id", ")", "->", "one", "(", ")", ";", "if", "(", "$", "account", "===", "null", ")", "{",...
Disconnects a network account from user. @param integer $id @return \yii\web\Response @throws \Exception @throws \Throwable @throws \yii\db\StaleObjectException
[ "Disconnects", "a", "network", "account", "from", "user", "." ]
train
https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/user/controllers/SettingsController.php#L188-L202
struzik-vladislav/php-error-handler
src/Processor/IntoExceptionProcessor.php
IntoExceptionProcessor.handle
public function handle($errno, $errstr, $errfile, $errline) { $class = $this->getAssociatedClass($errno); throw new $class($errstr, 0, $errno, $errfile, $errline); }
php
public function handle($errno, $errstr, $errfile, $errline) { $class = $this->getAssociatedClass($errno); throw new $class($errstr, 0, $errno, $errfile, $errline); }
[ "public", "function", "handle", "(", "$", "errno", ",", "$", "errstr", ",", "$", "errfile", ",", "$", "errline", ")", "{", "$", "class", "=", "$", "this", "->", "getAssociatedClass", "(", "$", "errno", ")", ";", "throw", "new", "$", "class", "(", "...
{@inheritdoc}
[ "{" ]
train
https://github.com/struzik-vladislav/php-error-handler/blob/87fa9f56edca7011f78e00659bb094b4fe713ebe/src/Processor/IntoExceptionProcessor.php#L50-L55
struzik-vladislav/php-error-handler
src/Processor/IntoExceptionProcessor.php
IntoExceptionProcessor.getAssociatedClass
private function getAssociatedClass($errno) { $associations = [ E_WARNING => Exception\WarningException::class, E_NOTICE => Exception\NoticeException::class, E_USER_ERROR => Exception\UserErrorException::class, E_USER_WARNING => Exception\UserWarningException:...
php
private function getAssociatedClass($errno) { $associations = [ E_WARNING => Exception\WarningException::class, E_NOTICE => Exception\NoticeException::class, E_USER_ERROR => Exception\UserErrorException::class, E_USER_WARNING => Exception\UserWarningException:...
[ "private", "function", "getAssociatedClass", "(", "$", "errno", ")", "{", "$", "associations", "=", "[", "E_WARNING", "=>", "Exception", "\\", "WarningException", "::", "class", ",", "E_NOTICE", "=>", "Exception", "\\", "NoticeException", "::", "class", ",", "...
Getting the exception class name associated with error code. @param int $errno level of the error raised @return string
[ "Getting", "the", "exception", "class", "name", "associated", "with", "error", "code", "." ]
train
https://github.com/struzik-vladislav/php-error-handler/blob/87fa9f56edca7011f78e00659bb094b4fe713ebe/src/Processor/IntoExceptionProcessor.php#L64-L83
webforge-labs/psc-cms
lib/Psc/Graph/DependencyVertice.php
DependencyVertice.dependsOn
public function dependsOn(Vertice $dependency) { $this->contextGraph->add($dependency, $this); $this->dependencies[] = $dependency; }
php
public function dependsOn(Vertice $dependency) { $this->contextGraph->add($dependency, $this); $this->dependencies[] = $dependency; }
[ "public", "function", "dependsOn", "(", "Vertice", "$", "dependency", ")", "{", "$", "this", "->", "contextGraph", "->", "add", "(", "$", "dependency", ",", "$", "this", ")", ";", "$", "this", "->", "dependencies", "[", "]", "=", "$", "dependency", ";"...
Füge eine Dependency zu $dependency von dieser Vertice hinzu eine topologische Sortierung eines DAG ist eine Lineare Anordnung all seiner Knoten mit der Eigenschaft dass u ($dependency) in der Anordnung vor v ($this) liegt (v ist abhängig von u), falls es eine Kante (u,v) gibt
[ "Füge", "eine", "Dependency", "zu", "$dependency", "von", "dieser", "Vertice", "hinzu" ]
train
https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Graph/DependencyVertice.php#L18-L21
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.setId
public function setId($v) { if ($v !== null && is_numeric($v)) { $v = (int) $v; } if ($this->id !== $v) { $this->id = $v; $this->modifiedColumns[] = CountryPeer::ID; } return $this; }
php
public function setId($v) { if ($v !== null && is_numeric($v)) { $v = (int) $v; } if ($this->id !== $v) { $this->id = $v; $this->modifiedColumns[] = CountryPeer::ID; } return $this; }
[ "public", "function", "setId", "(", "$", "v", ")", "{", "if", "(", "$", "v", "!==", "null", "&&", "is_numeric", "(", "$", "v", ")", ")", "{", "$", "v", "=", "(", "int", ")", "$", "v", ";", "}", "if", "(", "$", "this", "->", "id", "!==", "...
Set the value of [id] column. @param int $v new value @return Country The current object (for fluent API support)
[ "Set", "the", "value", "of", "[", "id", "]", "column", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L173-L186
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.setCode
public function setCode($v) { if ($v !== null) { $v = (string) $v; } if ($this->code !== $v) { $this->code = $v; $this->modifiedColumns[] = CountryPeer::CODE; } return $this; }
php
public function setCode($v) { if ($v !== null) { $v = (string) $v; } if ($this->code !== $v) { $this->code = $v; $this->modifiedColumns[] = CountryPeer::CODE; } return $this; }
[ "public", "function", "setCode", "(", "$", "v", ")", "{", "if", "(", "$", "v", "!==", "null", ")", "{", "$", "v", "=", "(", "string", ")", "$", "v", ";", "}", "if", "(", "$", "this", "->", "code", "!==", "$", "v", ")", "{", "$", "this", "...
Set the value of [code] column. @param string $v new value @return Country The current object (for fluent API support)
[ "Set", "the", "value", "of", "[", "code", "]", "column", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L194-L207
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.setEn
public function setEn($v) { if ($v !== null) { $v = (string) $v; } if ($this->en !== $v) { $this->en = $v; $this->modifiedColumns[] = CountryPeer::EN; } return $this; }
php
public function setEn($v) { if ($v !== null) { $v = (string) $v; } if ($this->en !== $v) { $this->en = $v; $this->modifiedColumns[] = CountryPeer::EN; } return $this; }
[ "public", "function", "setEn", "(", "$", "v", ")", "{", "if", "(", "$", "v", "!==", "null", ")", "{", "$", "v", "=", "(", "string", ")", "$", "v", ";", "}", "if", "(", "$", "this", "->", "en", "!==", "$", "v", ")", "{", "$", "this", "->",...
Set the value of [en] column. @param string $v new value @return Country The current object (for fluent API support)
[ "Set", "the", "value", "of", "[", "en", "]", "column", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L215-L228
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.setDe
public function setDe($v) { if ($v !== null) { $v = (string) $v; } if ($this->de !== $v) { $this->de = $v; $this->modifiedColumns[] = CountryPeer::DE; } return $this; }
php
public function setDe($v) { if ($v !== null) { $v = (string) $v; } if ($this->de !== $v) { $this->de = $v; $this->modifiedColumns[] = CountryPeer::DE; } return $this; }
[ "public", "function", "setDe", "(", "$", "v", ")", "{", "if", "(", "$", "v", "!==", "null", ")", "{", "$", "v", "=", "(", "string", ")", "$", "v", ";", "}", "if", "(", "$", "this", "->", "de", "!==", "$", "v", ")", "{", "$", "this", "->",...
Set the value of [de] column. @param string $v new value @return Country The current object (for fluent API support)
[ "Set", "the", "value", "of", "[", "de", "]", "column", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L236-L249
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.hydrate
public function hydrate($row, $startcol = 0, $rehydrate = false) { try { $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; $this->code = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null; $this->en = ($row[$startcol + 2] !=...
php
public function hydrate($row, $startcol = 0, $rehydrate = false) { try { $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; $this->code = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null; $this->en = ($row[$startcol + 2] !=...
[ "public", "function", "hydrate", "(", "$", "row", ",", "$", "startcol", "=", "0", ",", "$", "rehydrate", "=", "false", ")", "{", "try", "{", "$", "this", "->", "id", "=", "(", "$", "row", "[", "$", "startcol", "+", "0", "]", "!==", "null", ")",...
Hydrates (populates) the object variables with values from the database resultset. An offset (0-based "start column") is specified so that objects can be hydrated with a subset of the columns in the resultset rows. This is needed, for example, for results of JOIN queries where the resultset row includes columns from ...
[ "Hydrates", "(", "populates", ")", "the", "object", "variables", "with", "values", "from", "the", "database", "resultset", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L287-L309
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.doSave
protected function doSave(PropelPDO $con) { $affectedRows = 0; // initialize var to track total num of affected rows if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->isNew() || $this->isModified()) { // persist changes if (...
php
protected function doSave(PropelPDO $con) { $affectedRows = 0; // initialize var to track total num of affected rows if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->isNew() || $this->isModified()) { // persist changes if (...
[ "protected", "function", "doSave", "(", "PropelPDO", "$", "con", ")", "{", "$", "affectedRows", "=", "0", ";", "// initialize var to track total num of affected rows", "if", "(", "!", "$", "this", "->", "alreadyInSave", ")", "{", "$", "this", "->", "alreadyInSav...
Performs the work of inserting or updating the row in the database. If the object is new, it inserts it; otherwise an update is performed. All related objects are also updated in this method. @param PropelPDO $con @return int The number of rows affected by this insert/update and any referring fk objects' ...
[ "Performs", "the", "work", "of", "inserting", "or", "updating", "the", "row", "in", "the", "database", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L475-L514
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.doInsert
protected function doInsert(PropelPDO $con) { $modifiedColumns = array(); $index = 0; $this->modifiedColumns[] = CountryPeer::ID; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . CountryPeer::ID . ')'); ...
php
protected function doInsert(PropelPDO $con) { $modifiedColumns = array(); $index = 0; $this->modifiedColumns[] = CountryPeer::ID; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . CountryPeer::ID . ')'); ...
[ "protected", "function", "doInsert", "(", "PropelPDO", "$", "con", ")", "{", "$", "modifiedColumns", "=", "array", "(", ")", ";", "$", "index", "=", "0", ";", "$", "this", "->", "modifiedColumns", "[", "]", "=", "CountryPeer", "::", "ID", ";", "if", ...
Insert the row in the database. @param PropelPDO $con @throws PropelException @see doSave()
[ "Insert", "the", "row", "in", "the", "database", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L524-L586
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.doValidate
protected function doValidate($columns = null) { if (!$this->alreadyInValidation) { $this->alreadyInValidation = true; $retval = null; $failureMap = array(); if (($retval = CountryPeer::doValidate($this, $columns)) !== true) { $failureMap = ...
php
protected function doValidate($columns = null) { if (!$this->alreadyInValidation) { $this->alreadyInValidation = true; $retval = null; $failureMap = array(); if (($retval = CountryPeer::doValidate($this, $columns)) !== true) { $failureMap = ...
[ "protected", "function", "doValidate", "(", "$", "columns", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "alreadyInValidation", ")", "{", "$", "this", "->", "alreadyInValidation", "=", "true", ";", "$", "retval", "=", "null", ";", "$", "fa...
This function performs the validation work for complex object models. In addition to checking the current object, all related objects will also be validated. If all pass then <code>true</code> is returned; otherwise an aggregated array of ValidationFailed objects will be returned. @param array $columns Array of colu...
[ "This", "function", "performs", "the", "validation", "work", "for", "complex", "object", "models", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L655-L682
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.getByPosition
public function getByPosition($pos) { switch ($pos) { case 0: return $this->getId(); break; case 1: return $this->getCode(); break; case 2: return $this->getEn(); break; ...
php
public function getByPosition($pos) { switch ($pos) { case 0: return $this->getId(); break; case 1: return $this->getCode(); break; case 2: return $this->getEn(); break; ...
[ "public", "function", "getByPosition", "(", "$", "pos", ")", "{", "switch", "(", "$", "pos", ")", "{", "case", "0", ":", "return", "$", "this", "->", "getId", "(", ")", ";", "break", ";", "case", "1", ":", "return", "$", "this", "->", "getCode", ...
Retrieves a field from the object by Position as specified in the xml schema. Zero-based. @param int $pos position in xml schema @return mixed Value of field at $pos
[ "Retrieves", "a", "field", "from", "the", "object", "by", "Position", "as", "specified", "in", "the", "xml", "schema", ".", "Zero", "-", "based", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L709-L728
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.toArray
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) { if (isset($alreadyDumpedObjects['Country'][$this->getPrimaryKey()])) { return '*RECURSION*'; } $alreadyDumpedObjects['Coun...
php
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) { if (isset($alreadyDumpedObjects['Country'][$this->getPrimaryKey()])) { return '*RECURSION*'; } $alreadyDumpedObjects['Coun...
[ "public", "function", "toArray", "(", "$", "keyType", "=", "BasePeer", "::", "TYPE_PHPNAME", ",", "$", "includeLazyLoadColumns", "=", "true", ",", "$", "alreadyDumpedObjects", "=", "array", "(", ")", ",", "$", "includeForeignObjects", "=", "false", ")", "{", ...
Exports the object as an array. You can specify the key type of the array by passing one of the class type constants. @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. Defau...
[ "Exports", "the", "object", "as", "an", "array", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L745-L770
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.setByPosition
public function setByPosition($pos, $value) { switch ($pos) { case 0: $this->setId($value); break; case 1: $this->setCode($value); break; case 2: $this->setEn($value); break; ...
php
public function setByPosition($pos, $value) { switch ($pos) { case 0: $this->setId($value); break; case 1: $this->setCode($value); break; case 2: $this->setEn($value); break; ...
[ "public", "function", "setByPosition", "(", "$", "pos", ",", "$", "value", ")", "{", "switch", "(", "$", "pos", ")", "{", "case", "0", ":", "$", "this", "->", "setId", "(", "$", "value", ")", ";", "break", ";", "case", "1", ":", "$", "this", "-...
Sets a field from the object by Position as specified in the xml schema. Zero-based. @param int $pos position in xml schema @param mixed $value field value @return void
[ "Sets", "a", "field", "from", "the", "object", "by", "Position", "as", "specified", "in", "the", "xml", "schema", ".", "Zero", "-", "based", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L798-L814
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.fromArray
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = CountryPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); if (array_key_exists($keys[1], $arr)) $this->setCode($arr[$keys[1]]); if (array_key_exists($keys[2],...
php
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = CountryPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); if (array_key_exists($keys[1], $arr)) $this->setCode($arr[$keys[1]]); if (array_key_exists($keys[2],...
[ "public", "function", "fromArray", "(", "$", "arr", ",", "$", "keyType", "=", "BasePeer", "::", "TYPE_PHPNAME", ")", "{", "$", "keys", "=", "CountryPeer", "::", "getFieldNames", "(", "$", "keyType", ")", ";", "if", "(", "array_key_exists", "(", "$", "key...
Populates the object using an array. This is particularly useful when populating an object from one of the request arrays (e.g. $_POST). This method goes through the column names, checking to see whether a matching key exists in populated array. If so the setByName() method is called for that column. You can specify...
[ "Populates", "the", "object", "using", "an", "array", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L833-L841
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.buildCriteria
public function buildCriteria() { $criteria = new Criteria(CountryPeer::DATABASE_NAME); if ($this->isColumnModified(CountryPeer::ID)) $criteria->add(CountryPeer::ID, $this->id); if ($this->isColumnModified(CountryPeer::CODE)) $criteria->add(CountryPeer::CODE, $this->code); if ($this...
php
public function buildCriteria() { $criteria = new Criteria(CountryPeer::DATABASE_NAME); if ($this->isColumnModified(CountryPeer::ID)) $criteria->add(CountryPeer::ID, $this->id); if ($this->isColumnModified(CountryPeer::CODE)) $criteria->add(CountryPeer::CODE, $this->code); if ($this...
[ "public", "function", "buildCriteria", "(", ")", "{", "$", "criteria", "=", "new", "Criteria", "(", "CountryPeer", "::", "DATABASE_NAME", ")", ";", "if", "(", "$", "this", "->", "isColumnModified", "(", "CountryPeer", "::", "ID", ")", ")", "$", "criteria",...
Build a Criteria object containing the values of all modified columns in this object. @return Criteria The Criteria object containing all modified values.
[ "Build", "a", "Criteria", "object", "containing", "the", "values", "of", "all", "modified", "columns", "in", "this", "object", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L848-L858
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.copyInto
public function copyInto($copyObj, $deepCopy = false, $makeNew = true) { $copyObj->setCode($this->getCode()); $copyObj->setEn($this->getEn()); $copyObj->setDe($this->getDe()); if ($deepCopy && !$this->startCopy) { // important: temporarily setNew(false) because this affe...
php
public function copyInto($copyObj, $deepCopy = false, $makeNew = true) { $copyObj->setCode($this->getCode()); $copyObj->setEn($this->getEn()); $copyObj->setDe($this->getDe()); if ($deepCopy && !$this->startCopy) { // important: temporarily setNew(false) because this affe...
[ "public", "function", "copyInto", "(", "$", "copyObj", ",", "$", "deepCopy", "=", "false", ",", "$", "makeNew", "=", "true", ")", "{", "$", "copyObj", "->", "setCode", "(", "$", "this", "->", "getCode", "(", ")", ")", ";", "$", "copyObj", "->", "se...
Sets contents of passed object to values from current object. If desired, this method can also make copies of all associated (fkey referrers) objects. @param object $copyObj An object of Country (or compatible) type. @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. @para...
[ "Sets", "contents", "of", "passed", "object", "to", "values", "from", "current", "object", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L917-L944
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.initCustomers
public function initCustomers($overrideExisting = true) { if (null !== $this->collCustomers && !$overrideExisting) { return; } $this->collCustomers = new PropelObjectCollection(); $this->collCustomers->setModel('Customer'); }
php
public function initCustomers($overrideExisting = true) { if (null !== $this->collCustomers && !$overrideExisting) { return; } $this->collCustomers = new PropelObjectCollection(); $this->collCustomers->setModel('Customer'); }
[ "public", "function", "initCustomers", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collCustomers", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collCustomers", ...
Initializes the collCustomers collection. By default this just sets the collCustomers collection to an empty array (like clearcollCustomers()); however, you may wish to override this method in your stub class to provide setting appropriate to your application -- for example, setting the initial array to the values sto...
[ "Initializes", "the", "collCustomers", "collection", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L1041-L1048
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.getCustomers
public function getCustomers($criteria = null, PropelPDO $con = null) { $partial = $this->collCustomersPartial && !$this->isNew(); if (null === $this->collCustomers || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collCustomers) { // return empt...
php
public function getCustomers($criteria = null, PropelPDO $con = null) { $partial = $this->collCustomersPartial && !$this->isNew(); if (null === $this->collCustomers || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collCustomers) { // return empt...
[ "public", "function", "getCustomers", "(", "$", "criteria", "=", "null", ",", "PropelPDO", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collCustomersPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", ...
Gets an array of Customer objects which contain a foreign key that references this object. If the $criteria is not null, it is used to always fetch the results from the database. Otherwise the results are fetched from the database the first time, then cached. Next time the same method is called without $criteria, the ...
[ "Gets", "an", "array", "of", "Customer", "objects", "which", "contain", "a", "foreign", "key", "that", "references", "this", "object", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L1064-L1107
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.setCustomers
public function setCustomers(PropelCollection $customers, PropelPDO $con = null) { $customersToDelete = $this->getCustomers(new Criteria(), $con)->diff($customers); $this->customersScheduledForDeletion = $customersToDelete; foreach ($customersToDelete as $customerRemoved) { $c...
php
public function setCustomers(PropelCollection $customers, PropelPDO $con = null) { $customersToDelete = $this->getCustomers(new Criteria(), $con)->diff($customers); $this->customersScheduledForDeletion = $customersToDelete; foreach ($customersToDelete as $customerRemoved) { $c...
[ "public", "function", "setCustomers", "(", "PropelCollection", "$", "customers", ",", "PropelPDO", "$", "con", "=", "null", ")", "{", "$", "customersToDelete", "=", "$", "this", "->", "getCustomers", "(", "new", "Criteria", "(", ")", ",", "$", "con", ")", ...
Sets a collection of Customer objects related by a one-to-many relationship to the current object. It will also schedule objects for deletion based on a diff between old objects (aka persisted) and new objects from the given Propel collection. @param PropelCollection $customers A Propel collection. @param PropelPDO $c...
[ "Sets", "a", "collection", "of", "Customer", "objects", "related", "by", "a", "one", "-", "to", "-", "many", "relationship", "to", "the", "current", "object", ".", "It", "will", "also", "schedule", "objects", "for", "deletion", "based", "on", "a", "diff", ...
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L1119-L1139
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.countCustomers
public function countCustomers(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) { $partial = $this->collCustomersPartial && !$this->isNew(); if (null === $this->collCustomers || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collCustomers) { ...
php
public function countCustomers(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) { $partial = $this->collCustomersPartial && !$this->isNew(); if (null === $this->collCustomers || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collCustomers) { ...
[ "public", "function", "countCustomers", "(", "Criteria", "$", "criteria", "=", "null", ",", "$", "distinct", "=", "false", ",", "PropelPDO", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collCustomersPartial", "&&", "!", "$"...
Returns the number of related Customer objects. @param Criteria $criteria @param boolean $distinct @param PropelPDO $con @return int Count of related Customer objects. @throws PropelException
[ "Returns", "the", "number", "of", "related", "Customer", "objects", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L1150-L1172
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.addCustomer
public function addCustomer(Customer $l) { if ($this->collCustomers === null) { $this->initCustomers(); $this->collCustomersPartial = true; } if (!in_array($l, $this->collCustomers->getArrayCopy(), true)) { // only add it if the **same** object is not already associa...
php
public function addCustomer(Customer $l) { if ($this->collCustomers === null) { $this->initCustomers(); $this->collCustomersPartial = true; } if (!in_array($l, $this->collCustomers->getArrayCopy(), true)) { // only add it if the **same** object is not already associa...
[ "public", "function", "addCustomer", "(", "Customer", "$", "l", ")", "{", "if", "(", "$", "this", "->", "collCustomers", "===", "null", ")", "{", "$", "this", "->", "initCustomers", "(", ")", ";", "$", "this", "->", "collCustomersPartial", "=", "true", ...
Method called to associate a Customer object to this object through the Customer foreign key attribute. @param Customer $l Customer @return Country The current object (for fluent API support)
[ "Method", "called", "to", "associate", "a", "Customer", "object", "to", "this", "object", "through", "the", "Customer", "foreign", "key", "attribute", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L1181-L1197
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.clear
public function clear() { $this->id = null; $this->code = null; $this->en = null; $this->de = null; $this->alreadyInSave = false; $this->alreadyInValidation = false; $this->alreadyInClearAllReferencesDeep = false; $this->clearAllReferences(); $...
php
public function clear() { $this->id = null; $this->code = null; $this->en = null; $this->de = null; $this->alreadyInSave = false; $this->alreadyInValidation = false; $this->alreadyInClearAllReferencesDeep = false; $this->clearAllReferences(); $...
[ "public", "function", "clear", "(", ")", "{", "$", "this", "->", "id", "=", "null", ";", "$", "this", "->", "code", "=", "null", ";", "$", "this", "->", "en", "=", "null", ";", "$", "this", "->", "de", "=", "null", ";", "$", "this", "->", "al...
Clears the current object and sets all attributes to their default values
[ "Clears", "the", "current", "object", "and", "sets", "all", "attributes", "to", "their", "default", "values" ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L1230-L1244
slashworks/control-bundle
src/Slashworks/AppBundle/Model/om/BaseCountry.php
BaseCountry.clearAllReferences
public function clearAllReferences($deep = false) { if ($deep && !$this->alreadyInClearAllReferencesDeep) { $this->alreadyInClearAllReferencesDeep = true; if ($this->collCustomers) { foreach ($this->collCustomers as $o) { $o->clearAllReferences($de...
php
public function clearAllReferences($deep = false) { if ($deep && !$this->alreadyInClearAllReferencesDeep) { $this->alreadyInClearAllReferencesDeep = true; if ($this->collCustomers) { foreach ($this->collCustomers as $o) { $o->clearAllReferences($de...
[ "public", "function", "clearAllReferences", "(", "$", "deep", "=", "false", ")", "{", "if", "(", "$", "deep", "&&", "!", "$", "this", "->", "alreadyInClearAllReferencesDeep", ")", "{", "$", "this", "->", "alreadyInClearAllReferencesDeep", "=", "true", ";", "...
Resets all references to other model objects or collections of model objects. This method is a user-space workaround for PHP's inability to garbage collect objects with circular references (even in PHP 5.3). This is currently necessary when using Propel in certain daemon or large-volume/high-memory operations. @param...
[ "Resets", "all", "references", "to", "other", "model", "objects", "or", "collections", "of", "model", "objects", "." ]
train
https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseCountry.php#L1255-L1272
CakeCMS/Core
src/Controller/Component/MoveComponent.php
MoveComponent.down
public function down(Table $table, $id, $step = 1) { return $this->_move($table, $id, $step, self::TYPE_DOWN); }
php
public function down(Table $table, $id, $step = 1) { return $this->_move($table, $id, $step, self::TYPE_DOWN); }
[ "public", "function", "down", "(", "Table", "$", "table", ",", "$", "id", ",", "$", "step", "=", "1", ")", "{", "return", "$", "this", "->", "_move", "(", "$", "table", ",", "$", "id", ",", "$", "step", ",", "self", "::", "TYPE_DOWN", ")", ";",...
Move down record in tree. @param Table $table @param int $id @param int $step @return \Cake\Http\Response|null
[ "Move", "down", "record", "in", "tree", "." ]
train
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Controller/Component/MoveComponent.php#L53-L56
CakeCMS/Core
src/Controller/Component/MoveComponent.php
MoveComponent.setConfig
public function setConfig($key, $value = null, $merge = true) { $this->_defaultConfig = [ 'messages' => [ 'success' => __d('core', 'Object has been moved'), 'error' => __d('core', 'Object could not been moved') ], 'action' => 'index', ...
php
public function setConfig($key, $value = null, $merge = true) { $this->_defaultConfig = [ 'messages' => [ 'success' => __d('core', 'Object has been moved'), 'error' => __d('core', 'Object could not been moved') ], 'action' => 'index', ...
[ "public", "function", "setConfig", "(", "$", "key", ",", "$", "value", "=", "null", ",", "$", "merge", "=", "true", ")", "{", "$", "this", "->", "_defaultConfig", "=", "[", "'messages'", "=>", "[", "'success'", "=>", "__d", "(", "'core'", ",", "'Obje...
Sets the config. @param array|string $key @param null|mixed $value @param bool $merge @return mixed @throws \Aura\Intl\Exception @throws \Cake\Core\Exception\Exception When trying to set a key that is invalid.
[ "Sets", "the", "config", "." ]
train
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Controller/Component/MoveComponent.php#L69-L80
CakeCMS/Core
src/Controller/Component/MoveComponent.php
MoveComponent.up
public function up(Table $table, $id, $step = 1) { return $this->_move($table, $id, $step); }
php
public function up(Table $table, $id, $step = 1) { return $this->_move($table, $id, $step); }
[ "public", "function", "up", "(", "Table", "$", "table", ",", "$", "id", ",", "$", "step", "=", "1", ")", "{", "return", "$", "this", "->", "_move", "(", "$", "table", ",", "$", "id", ",", "$", "step", ")", ";", "}" ]
Move up record in tree. @param Table $table @param int $id @param int $step @return \Cake\Http\Response|null @SuppressWarnings(PHPMD.ShortMethodName)
[ "Move", "up", "record", "in", "tree", "." ]
train
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Controller/Component/MoveComponent.php#L92-L95
CakeCMS/Core
src/Controller/Component/MoveComponent.php
MoveComponent._move
protected function _move(Table $table, $id, $step = 1, $type = self::TYPE_UP) { $behaviors = $table->behaviors(); if (!Arr::in('Tree', $behaviors->loaded())) { $behaviors->load('Tree'); } $entity = $table->get($id); /** @var TreeBehavior $treeBehavior */ ...
php
protected function _move(Table $table, $id, $step = 1, $type = self::TYPE_UP) { $behaviors = $table->behaviors(); if (!Arr::in('Tree', $behaviors->loaded())) { $behaviors->load('Tree'); } $entity = $table->get($id); /** @var TreeBehavior $treeBehavior */ ...
[ "protected", "function", "_move", "(", "Table", "$", "table", ",", "$", "id", ",", "$", "step", "=", "1", ",", "$", "type", "=", "self", "::", "TYPE_UP", ")", "{", "$", "behaviors", "=", "$", "table", "->", "behaviors", "(", ")", ";", "if", "(", ...
Move object in tree table. @param Table $table @param string $type @param int $id @param int $step @return \Cake\Http\Response|null
[ "Move", "object", "in", "tree", "table", "." ]
train
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Controller/Component/MoveComponent.php#L106-L126
CakeCMS/Core
src/Controller/Component/MoveComponent.php
MoveComponent._redirect
protected function _redirect() { $request = $this->_controller->request; return $this->_controller->redirect([ 'prefix' => $request->getParam('prefix'), 'plugin' => $request->getParam('plugin'), 'controller' => $request->getParam('controller'), ...
php
protected function _redirect() { $request = $this->_controller->request; return $this->_controller->redirect([ 'prefix' => $request->getParam('prefix'), 'plugin' => $request->getParam('plugin'), 'controller' => $request->getParam('controller'), ...
[ "protected", "function", "_redirect", "(", ")", "{", "$", "request", "=", "$", "this", "->", "_controller", "->", "request", ";", "return", "$", "this", "->", "_controller", "->", "redirect", "(", "[", "'prefix'", "=>", "$", "request", "->", "getParam", ...
Process redirect. @return \Cake\Http\Response|null
[ "Process", "redirect", "." ]
train
https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/Controller/Component/MoveComponent.php#L133-L142
nguyenanhung/nusoap
src-fix/nusoap.php
nusoap_base.&
function &getDebugAsXMLComment() { // it would be nice to use a memory stream here to use // memory more efficiently while (strpos($this->debug_str, '--')) { $this->debug_str = str_replace('--', '- -', $this->debug_str); } $ret = "<!--\n" . $this->debug_str . "\n-...
php
function &getDebugAsXMLComment() { // it would be nice to use a memory stream here to use // memory more efficiently while (strpos($this->debug_str, '--')) { $this->debug_str = str_replace('--', '- -', $this->debug_str); } $ret = "<!--\n" . $this->debug_str . "\n-...
[ "function", "&", "getDebugAsXMLComment", "(", ")", "{", "// it would be nice to use a memory stream here to use", "// memory more efficiently", "while", "(", "strpos", "(", "$", "this", "->", "debug_str", ",", "'--'", ")", ")", "{", "$", "this", "->", "debug_str", "...
gets the current debug data for this instance as an XML comment this may change the contents of the debug data @return debug data as an XML comment @access public
[ "gets", "the", "current", "debug", "data", "for", "this", "instance", "as", "an", "XML", "comment", "this", "may", "change", "the", "contents", "of", "the", "debug", "data" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L346-L356
nguyenanhung/nusoap
src-fix/nusoap.php
nusoap_base.serialize_val
function serialize_val( $val, $name = FALSE, $type = FALSE, $name_ns = FALSE, $type_ns = FALSE, $attributes = FALSE, $use = 'encoded', $soapval = FALSE ) { $this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use, soapval=$soapval"); $this->appendD...
php
function serialize_val( $val, $name = FALSE, $type = FALSE, $name_ns = FALSE, $type_ns = FALSE, $attributes = FALSE, $use = 'encoded', $soapval = FALSE ) { $this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use, soapval=$soapval"); $this->appendD...
[ "function", "serialize_val", "(", "$", "val", ",", "$", "name", "=", "FALSE", ",", "$", "type", "=", "FALSE", ",", "$", "name_ns", "=", "FALSE", ",", "$", "type_ns", "=", "FALSE", ",", "$", "attributes", "=", "FALSE", ",", "$", "use", "=", "'encode...
serializes PHP values in accordance w/ section 5. Type information is not serialized if $use == 'literal'. @param mixed $val The value to serialize @param string $name The name (local part) of the XML element @param string $type The XML schema type (local part) for the element @param string $na...
[ "serializes", "PHP", "values", "in", "accordance", "w", "/", "section", "5", ".", "Type", "information", "is", "not", "serialized", "if", "$use", "==", "literal", "." ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L440-L700
nguyenanhung/nusoap
src-fix/nusoap.php
nusoap_base.getNamespaceFromPrefix
function getNamespaceFromPrefix($prefix) { if (isset($this->namespaces[$prefix])) { return $this->namespaces[$prefix]; } //$this->setError("No namespace registered for prefix '$prefix'"); return FALSE; }
php
function getNamespaceFromPrefix($prefix) { if (isset($this->namespaces[$prefix])) { return $this->namespaces[$prefix]; } //$this->setError("No namespace registered for prefix '$prefix'"); return FALSE; }
[ "function", "getNamespaceFromPrefix", "(", "$", "prefix", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "namespaces", "[", "$", "prefix", "]", ")", ")", "{", "return", "$", "this", "->", "namespaces", "[", "$", "prefix", "]", ";", "}", "//$th...
pass it a prefix, it returns a namespace @param string $prefix The prefix @return mixed The namespace, false if no namespace has the specified prefix @access public
[ "pass", "it", "a", "prefix", "it", "returns", "a", "namespace" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L883-L891
nguyenanhung/nusoap
src-fix/nusoap.php
nusoap_base.getPrefixFromNamespace
function getPrefixFromNamespace($ns) { foreach ($this->namespaces as $p => $n) { if ($ns == $n || $ns == $p) { $this->usedNamespaces[$p] = $n; return $p; } } return FALSE; }
php
function getPrefixFromNamespace($ns) { foreach ($this->namespaces as $p => $n) { if ($ns == $n || $ns == $p) { $this->usedNamespaces[$p] = $n; return $p; } } return FALSE; }
[ "function", "getPrefixFromNamespace", "(", "$", "ns", ")", "{", "foreach", "(", "$", "this", "->", "namespaces", "as", "$", "p", "=>", "$", "n", ")", "{", "if", "(", "$", "ns", "==", "$", "n", "||", "$", "ns", "==", "$", "p", ")", "{", "$", "...
returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace @param string $ns The namespace @return mixed The prefix, false if the namespace has no prefixes @access public
[ "returns", "the", "prefix", "for", "a", "given", "namespace", "(", "or", "prefix", ")", "or", "false", "if", "no", "prefixes", "registered", "for", "the", "given", "namespace" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L902-L913
nguyenanhung/nusoap
src-fix/nusoap.php
nusoap_xmlschema.parseFile
function parseFile($xml, $type) { // parse xml file if ($xml != "") { $xmlStr = @join("", @file($xml)); if ($xmlStr == "") { $msg = 'Error reading XML from ' . $xml; $this->setError($msg); $this->debug($msg); re...
php
function parseFile($xml, $type) { // parse xml file if ($xml != "") { $xmlStr = @join("", @file($xml)); if ($xmlStr == "") { $msg = 'Error reading XML from ' . $xml; $this->setError($msg); $this->debug($msg); re...
[ "function", "parseFile", "(", "$", "xml", ",", "$", "type", ")", "{", "// parse xml file", "if", "(", "$", "xml", "!=", "\"\"", ")", "{", "$", "xmlStr", "=", "@", "join", "(", "\"\"", ",", "@", "file", "(", "$", "xml", ")", ")", ";", "if", "(",...
parse an XML file @param string $xml path/URL to XML file @param string $type (schema | xml) @return boolean @access public
[ "parse", "an", "XML", "file" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L1252-L1273
nguyenanhung/nusoap
src-fix/nusoap.php
nusoap_xmlschema.schemaStartElement
function schemaStartElement($parser, $name, $attrs) { // position in the total number of elements, starting from 0 $pos = $this->position++; $depth = $this->depth++; // set self as current value for this depth $this->depth_array[$depth] = $pos; $this->message[$pos]...
php
function schemaStartElement($parser, $name, $attrs) { // position in the total number of elements, starting from 0 $pos = $this->position++; $depth = $this->depth++; // set self as current value for this depth $this->depth_array[$depth] = $pos; $this->message[$pos]...
[ "function", "schemaStartElement", "(", "$", "parser", ",", "$", "name", ",", "$", "attrs", ")", "{", "// position in the total number of elements, starting from 0", "$", "pos", "=", "$", "this", "->", "position", "++", ";", "$", "depth", "=", "$", "this", "->"...
start-element handler @param string $parser XML parser object @param string $name element name @param string $attrs associative array of attributes @access private
[ "start", "-", "element", "handler" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L1352-L1671
nguyenanhung/nusoap
src-fix/nusoap.php
nusoap_xmlschema.schemaEndElement
function schemaEndElement($parser, $name) { // bring depth down a notch $this->depth--; // position of current element is equal to the last value left in depth_array for my depth if (isset($this->depth_array[$this->depth])) { $pos = $this->depth_array[$this->depth]; ...
php
function schemaEndElement($parser, $name) { // bring depth down a notch $this->depth--; // position of current element is equal to the last value left in depth_array for my depth if (isset($this->depth_array[$this->depth])) { $pos = $this->depth_array[$this->depth]; ...
[ "function", "schemaEndElement", "(", "$", "parser", ",", "$", "name", ")", "{", "// bring depth down a notch", "$", "this", "->", "depth", "--", ";", "// position of current element is equal to the last value left in depth_array for my depth", "if", "(", "isset", "(", "$"...
end-element handler @param string $parser XML parser object @param string $name element name @access private
[ "end", "-", "element", "handler" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L1681-L1712
nguyenanhung/nusoap
src-fix/nusoap.php
nusoap_xmlschema.getPHPType
function getPHPType($type, $ns) { if (isset($this->typemap[$ns][$type])) { //print "found type '$type' and ns $ns in typemap<br>"; return $this->typemap[$ns][$type]; } elseif (isset($this->complexTypes[$type])) { //print "getting type '$type' and ns $ns from compl...
php
function getPHPType($type, $ns) { if (isset($this->typemap[$ns][$type])) { //print "found type '$type' and ns $ns in typemap<br>"; return $this->typemap[$ns][$type]; } elseif (isset($this->complexTypes[$type])) { //print "getting type '$type' and ns $ns from compl...
[ "function", "getPHPType", "(", "$", "type", ",", "$", "ns", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "typemap", "[", "$", "ns", "]", "[", "$", "type", "]", ")", ")", "{", "//print \"found type '$type' and ns $ns in typemap<br>\";", "return", ...
get the PHP type of a user defined type in the schema PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays returns false if no type exists, or not w/ the given namespace else returns a string that is either a native php type, or 'struct' @param string $type name of defined type @param st...
[ "get", "the", "PHP", "type", "of", "a", "user", "defined", "type", "in", "the", "schema", "PHP", "type", "is", "kind", "of", "a", "misnomer", "since", "it", "actually", "returns", "struct", "for", "assoc", ".", "arrays", "returns", "false", "if", "no", ...
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L1872-L1883
nguyenanhung/nusoap
src-fix/nusoap.php
nusoap_xmlschema.getTypeDef
function getTypeDef($type) { //$this->debug("in getTypeDef for type $type"); if (substr($type, -1) == '^') { $is_element = 1; $type = substr($type, 0, -1); } else { $is_element = 0; } if ((!$is_element) && isset($this->complexTypes[$...
php
function getTypeDef($type) { //$this->debug("in getTypeDef for type $type"); if (substr($type, -1) == '^') { $is_element = 1; $type = substr($type, 0, -1); } else { $is_element = 0; } if ((!$is_element) && isset($this->complexTypes[$...
[ "function", "getTypeDef", "(", "$", "type", ")", "{", "//$this->debug(\"in getTypeDef for type $type\");", "if", "(", "substr", "(", "$", "type", ",", "-", "1", ")", "==", "'^'", ")", "{", "$", "is_element", "=", "1", ";", "$", "type", "=", "substr", "("...
returns an associative array of information about a given type returns false if no type exists by the given name For a complexType typeDef = array( 'restrictionBase' => '', 'phpType' => '', 'compositor' => '(sequence|all)', 'elements' => array(), // refs to elements array 'attrs' => array() // refs to attributes array...
[ "returns", "an", "associative", "array", "of", "information", "about", "a", "given", "type", "returns", "false", "if", "no", "type", "exists", "by", "the", "given", "name" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L1908-L1984
nguyenanhung/nusoap
src-fix/nusoap.php
nusoap_xmlschema.serializeTypeDef
function serializeTypeDef($type) { //print "in sTD() for type $type<br>"; if ($typeDef = $this->getTypeDef($type)) { $str .= '<' . $type; if (is_array($typeDef['attrs'])) { foreach ($typeDef['attrs'] as $attName => $data) { $str .= " $attNa...
php
function serializeTypeDef($type) { //print "in sTD() for type $type<br>"; if ($typeDef = $this->getTypeDef($type)) { $str .= '<' . $type; if (is_array($typeDef['attrs'])) { foreach ($typeDef['attrs'] as $attName => $data) { $str .= " $attNa...
[ "function", "serializeTypeDef", "(", "$", "type", ")", "{", "//print \"in sTD() for type $type<br>\";", "if", "(", "$", "typeDef", "=", "$", "this", "->", "getTypeDef", "(", "$", "type", ")", ")", "{", "$", "str", ".=", "'<'", ".", "$", "type", ";", "if"...
returns a sample serialization of a given type, or false if no type by the given name @param string $type name of type @return mixed @access public @deprecated
[ "returns", "a", "sample", "serialization", "of", "a", "given", "type", "or", "false", "if", "no", "type", "by", "the", "given", "name" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L1995-L2022
nguyenanhung/nusoap
src-fix/nusoap.php
nusoap_xmlschema.typeToForm
function typeToForm($name, $type) { // get typedef if ($typeDef = $this->getTypeDef($type)) { // if struct if ($typeDef['phpType'] == 'struct') { $buffer .= '<table>'; foreach ($typeDef['elements'] as $child => $childDef) { ...
php
function typeToForm($name, $type) { // get typedef if ($typeDef = $this->getTypeDef($type)) { // if struct if ($typeDef['phpType'] == 'struct') { $buffer .= '<table>'; foreach ($typeDef['elements'] as $child => $childDef) { ...
[ "function", "typeToForm", "(", "$", "name", ",", "$", "type", ")", "{", "// get typedef", "if", "(", "$", "typeDef", "=", "$", "this", "->", "getTypeDef", "(", "$", "type", ")", ")", "{", "// if struct", "if", "(", "$", "typeDef", "[", "'phpType'", "...
returns HTML form elements that allow a user to enter values for creating an instance of the given type. @param string $name name for type instance @param string $type name of type @return string @access public @deprecated
[ "returns", "HTML", "form", "elements", "that", "allow", "a", "user", "to", "enter", "values", "for", "creating", "an", "instance", "of", "the", "given", "type", "." ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L2035-L2066
nguyenanhung/nusoap
src-fix/nusoap.php
nusoap_xmlschema.addComplexType
function addComplexType( $name, $typeClass = 'complexType', $phpType = 'array', $compositor = '', $restrictionBase = '', $elements = [], $attrs = [], $arrayType = '' ) { $this->complexTypes[$name] = [ 'name' => $name, 'typeClass' => $typeClass, ...
php
function addComplexType( $name, $typeClass = 'complexType', $phpType = 'array', $compositor = '', $restrictionBase = '', $elements = [], $attrs = [], $arrayType = '' ) { $this->complexTypes[$name] = [ 'name' => $name, 'typeClass' => $typeClass, ...
[ "function", "addComplexType", "(", "$", "name", ",", "$", "typeClass", "=", "'complexType'", ",", "$", "phpType", "=", "'array'", ",", "$", "compositor", "=", "''", ",", "$", "restrictionBase", "=", "''", ",", "$", "elements", "=", "[", "]", ",", "$", ...
adds a complex type to the schema example: array addType( 'ArrayOfstring', 'complexType', 'array', '', 'SOAP-ENC:Array', array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'), 'xsd:string' ); example: PHP associative array ( SOAP Struct ) addType( 'SOAPStruct', 'complexType', 'struct', 'all', array('myVar...
[ "adds", "a", "complex", "type", "to", "the", "schema" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L2110-L2127
nguyenanhung/nusoap
src-fix/nusoap.php
soap_transport_http.setURL
function setURL($url) { $this->url = $url; $u = parse_url($url); foreach ($u as $k => $v) { $this->debug("parsed URL $k = $v"); $this->$k = $v; } // add any GET params to path if (isset($u['query']) && $u['query'] != '') { $this->...
php
function setURL($url) { $this->url = $url; $u = parse_url($url); foreach ($u as $k => $v) { $this->debug("parsed URL $k = $v"); $this->$k = $v; } // add any GET params to path if (isset($u['query']) && $u['query'] != '') { $this->...
[ "function", "setURL", "(", "$", "url", ")", "{", "$", "this", "->", "url", "=", "$", "url", ";", "$", "u", "=", "parse_url", "(", "$", "url", ")", ";", "foreach", "(", "$", "u", "as", "$", "k", "=>", "$", "v", ")", "{", "$", "this", "->", ...
sets the URL to which to connect @param string $url The URL to which to connect @access private
[ "sets", "the", "URL", "to", "which", "to", "connect" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L2409-L2446
nguyenanhung/nusoap
src-fix/nusoap.php
soap_transport_http.setEncoding
function setEncoding($enc = 'gzip, deflate') { if (function_exists('gzdeflate')) { $this->protocol_version = '1.1'; $this->setHeader('Accept-Encoding', $enc); if (!isset($this->outgoing_headers['Connection'])) { $this->setHeader('Connection', 'close'); ...
php
function setEncoding($enc = 'gzip, deflate') { if (function_exists('gzdeflate')) { $this->protocol_version = '1.1'; $this->setHeader('Accept-Encoding', $enc); if (!isset($this->outgoing_headers['Connection'])) { $this->setHeader('Connection', 'close'); ...
[ "function", "setEncoding", "(", "$", "enc", "=", "'gzip, deflate'", ")", "{", "if", "(", "function_exists", "(", "'gzdeflate'", ")", ")", "{", "$", "this", "->", "protocol_version", "=", "'1.1'", ";", "$", "this", "->", "setHeader", "(", "'Accept-Encoding'",...
use http encoding @param string $enc encoding style. supported values: gzip, deflate, or both @access public
[ "use", "http", "encoding" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L2873-L2886
nguyenanhung/nusoap
src-fix/nusoap.php
soap_transport_http.isSkippableCurlHeader
function isSkippableCurlHeader(&$data) { $skipHeaders = ['HTTP/1.1 100', 'HTTP/1.0 301', 'HTTP/1.1 301', 'HTTP/1.0 302', 'HTTP/1.1 302', 'HTTP/1.0 401', 'HTTP/1.1 4...
php
function isSkippableCurlHeader(&$data) { $skipHeaders = ['HTTP/1.1 100', 'HTTP/1.0 301', 'HTTP/1.1 301', 'HTTP/1.0 302', 'HTTP/1.1 302', 'HTTP/1.0 401', 'HTTP/1.1 4...
[ "function", "isSkippableCurlHeader", "(", "&", "$", "data", ")", "{", "$", "skipHeaders", "=", "[", "'HTTP/1.1 100'", ",", "'HTTP/1.0 301'", ",", "'HTTP/1.1 301'", ",", "'HTTP/1.0 302'", ",", "'HTTP/1.1 302'", ",", "'HTTP/1.0 401'", ",", "'HTTP/1.1 401'", ",", "'H...
Test if the given string starts with a header that is to be skipped. Skippable headers result from chunked transfer and proxy requests. @param string $data The string to check. @returns boolean Whether a skippable header was found. @access private
[ "Test", "if", "the", "given", "string", "starts", "with", "a", "header", "that", "is", "to", "be", "skipped", ".", "Skippable", "headers", "result", "from", "chunked", "transfer", "and", "proxy", "requests", "." ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L2928-L2946
nguyenanhung/nusoap
src-fix/nusoap.php
soap_transport_http.getResponse
function getResponse() { $this->incoming_payload = ''; if ($this->io_method() == 'socket') { // loop until headers have been retrieved $data = ''; while (!isset($lb)) { // We might EOF during header read. if (feof($this->fp)) { ...
php
function getResponse() { $this->incoming_payload = ''; if ($this->io_method() == 'socket') { // loop until headers have been retrieved $data = ''; while (!isset($lb)) { // We might EOF during header read. if (feof($this->fp)) { ...
[ "function", "getResponse", "(", ")", "{", "$", "this", "->", "incoming_payload", "=", "''", ";", "if", "(", "$", "this", "->", "io_method", "(", ")", "==", "'socket'", ")", "{", "// loop until headers have been retrieved", "$", "data", "=", "''", ";", "whi...
gets the SOAP response via HTTP[S] @return string the response (also sets member variables like incoming_payload) @access private
[ "gets", "the", "SOAP", "response", "via", "HTTP", "[", "S", "]" ]
train
https://github.com/nguyenanhung/nusoap/blob/a9b4d98f4f3fe748f8e5d9f8091dfc53585d2556/src-fix/nusoap.php#L3132-L3521