id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
36,200 | CeusMedia/Common | src/Net/HTTP/Reader.php | Net_HTTP_Reader.get | public function get( $url, $headers = array(), $curlOptions = array() )
{
$curl = clone( $this->curl );
$curl->setOption( CURLOPT_URL, $url );
if( $headers )
{
if( $headers instanceof Net_HTTP_Header_Section )
$headers = $headers->toArray();
$curlOptions[CURLOPT_HTTPHEADER] = $headers;
}
$this->a... | php | public function get( $url, $headers = array(), $curlOptions = array() )
{
$curl = clone( $this->curl );
$curl->setOption( CURLOPT_URL, $url );
if( $headers )
{
if( $headers instanceof Net_HTTP_Header_Section )
$headers = $headers->toArray();
$curlOptions[CURLOPT_HTTPHEADER] = $headers;
}
$this->a... | [
"public",
"function",
"get",
"(",
"$",
"url",
",",
"$",
"headers",
"=",
"array",
"(",
")",
",",
"$",
"curlOptions",
"=",
"array",
"(",
")",
")",
"{",
"$",
"curl",
"=",
"clone",
"(",
"$",
"this",
"->",
"curl",
")",
";",
"$",
"curl",
"->",
"setOp... | Returns Resource Response.
@access public
@param string $url Resource URL
@param array|Net_HTTP_Header_Section $headers Map of HTTP Header Fields or Header Section Object
@param array $curlOptions Map of cURL Options
@return Net_HTTP_Response | [
"Returns",
"Resource",
"Response",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/HTTP/Reader.php#L96-L119 |
36,201 | CeusMedia/Common | src/Net/HTTP/Reader.php | Net_HTTP_Reader.getCurlInfo | public function getCurlInfo( $key = NULL )
{
if( !$this->curlInfo )
throw new RuntimeException( "No Request has been sent, yet." );
if( !$key )
return $this->curlInfo;
if( !array_key_exists( $key, $this->curlInfo ) )
throw new InvalidArgumentException( 'Status Key "'.$key.'" is invalid.' );
return $th... | php | public function getCurlInfo( $key = NULL )
{
if( !$this->curlInfo )
throw new RuntimeException( "No Request has been sent, yet." );
if( !$key )
return $this->curlInfo;
if( !array_key_exists( $key, $this->curlInfo ) )
throw new InvalidArgumentException( 'Status Key "'.$key.'" is invalid.' );
return $th... | [
"public",
"function",
"getCurlInfo",
"(",
"$",
"key",
"=",
"NULL",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"curlInfo",
")",
"throw",
"new",
"RuntimeException",
"(",
"\"No Request has been sent, yet.\"",
")",
";",
"if",
"(",
"!",
"$",
"key",
")",
"re... | Returns Info Array or single Information from last cURL Request.
@access public
@param string $key Information Key
@return mixed | [
"Returns",
"Info",
"Array",
"or",
"single",
"Information",
"from",
"last",
"cURL",
"Request",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/HTTP/Reader.php#L127-L136 |
36,202 | CeusMedia/Common | src/Net/HTTP/Reader.php | Net_HTTP_Reader.post | public function post( $url, $data, $headers = array(), $curlOptions = array() )
{
$curl = clone( $this->curl );
$curl->setOption( CURLOPT_URL, $url );
if( $headers )
{
if( $headers instanceof Net_HTTP_Header_Section )
$headers = $headers->toArray();
$curlOptions[CURLOPT_HTTPHEADER] = $headers;
}
... | php | public function post( $url, $data, $headers = array(), $curlOptions = array() )
{
$curl = clone( $this->curl );
$curl->setOption( CURLOPT_URL, $url );
if( $headers )
{
if( $headers instanceof Net_HTTP_Header_Section )
$headers = $headers->toArray();
$curlOptions[CURLOPT_HTTPHEADER] = $headers;
}
... | [
"public",
"function",
"post",
"(",
"$",
"url",
",",
"$",
"data",
",",
"$",
"headers",
"=",
"array",
"(",
")",
",",
"$",
"curlOptions",
"=",
"array",
"(",
")",
")",
"{",
"$",
"curl",
"=",
"clone",
"(",
"$",
"this",
"->",
"curl",
")",
";",
"$",
... | Posts Data to Resource and returns Response.
@access public
@param string $url Resource URL
@param array $data Map of POST Data
@param array|Net_HTTP_Header_Section $headers Map of HTTP Header Fields or Header Section Object
@param array $curlOptions Map of cURL Options
@return Net_HTTP_Res... | [
"Posts",
"Data",
"to",
"Resource",
"and",
"returns",
"Response",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/HTTP/Reader.php#L147-L173 |
36,203 | CeusMedia/Common | src/Net/HTTP/Reader.php | Net_HTTP_Reader.setBasicAuth | public function setBasicAuth( $username, $password )
{
$this->curl->setOption( CURLOPT_HTTPAUTH, CURLAUTH_BASIC );
$this->curl->setOption( CURLOPT_USERPWD, $username.":".$password );
} | php | public function setBasicAuth( $username, $password )
{
$this->curl->setOption( CURLOPT_HTTPAUTH, CURLAUTH_BASIC );
$this->curl->setOption( CURLOPT_USERPWD, $username.":".$password );
} | [
"public",
"function",
"setBasicAuth",
"(",
"$",
"username",
",",
"$",
"password",
")",
"{",
"$",
"this",
"->",
"curl",
"->",
"setOption",
"(",
"CURLOPT_HTTPAUTH",
",",
"CURLAUTH_BASIC",
")",
";",
"$",
"this",
"->",
"curl",
"->",
"setOption",
"(",
"CURLOPT_... | Set Username and Password for Basic Auth.
@access public
@param string $username Basic Auth Username
@param string $password Basic Auth Password
@return void | [
"Set",
"Username",
"and",
"Password",
"for",
"Basic",
"Auth",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/HTTP/Reader.php#L182-L186 |
36,204 | CeusMedia/Common | src/Net/HTTP/Reader.php | Net_HTTP_Reader.setUserAgent | public function setUserAgent( $string )
{
if( empty( $string ) )
throw new InvaligArgumentException( 'Must be set' );
$this->curl->setOption( CURLOPT_USERAGENT, $string );
} | php | public function setUserAgent( $string )
{
if( empty( $string ) )
throw new InvaligArgumentException( 'Must be set' );
$this->curl->setOption( CURLOPT_USERAGENT, $string );
} | [
"public",
"function",
"setUserAgent",
"(",
"$",
"string",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"string",
")",
")",
"throw",
"new",
"InvaligArgumentException",
"(",
"'Must be set'",
")",
";",
"$",
"this",
"->",
"curl",
"->",
"setOption",
"(",
"CURLOPT_US... | Sets User Agent.
@access public
@param string $string User Agent to set
@return void | [
"Sets",
"User",
"Agent",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/HTTP/Reader.php#L236-L241 |
36,205 | CeusMedia/Common | src/Net/HTTP/Reader.php | Net_HTTP_Reader.setVerify | public function setVerify( $host = FALSE, $peer = 0, $caPath = NULL, $caInfo = NULL )
{
$this->curl->setOption( CURLOPT_SSL_VERIFYHOST, $host );
$this->curl->setOption( CURLOPT_SSL_VERIFYPEER, $peer );
$this->curl->setOption( CURLOPT_CAPATH, $caPath );
$this->curl->setOption( CURLOPT_CAINFO, $caInfo );
} | php | public function setVerify( $host = FALSE, $peer = 0, $caPath = NULL, $caInfo = NULL )
{
$this->curl->setOption( CURLOPT_SSL_VERIFYHOST, $host );
$this->curl->setOption( CURLOPT_SSL_VERIFYPEER, $peer );
$this->curl->setOption( CURLOPT_CAPATH, $caPath );
$this->curl->setOption( CURLOPT_CAINFO, $caInfo );
} | [
"public",
"function",
"setVerify",
"(",
"$",
"host",
"=",
"FALSE",
",",
"$",
"peer",
"=",
"0",
",",
"$",
"caPath",
"=",
"NULL",
",",
"$",
"caInfo",
"=",
"NULL",
")",
"{",
"$",
"this",
"->",
"curl",
"->",
"setOption",
"(",
"CURLOPT_SSL_VERIFYHOST",
",... | Sets up SSL Verification.
@access public
@param boolean $host Flag: verify Host
@param integer $peer Flag: verify Peer
@param string $caPath Path to certificates
@param string $caInfo Certificate File Name
@return void | [
"Sets",
"up",
"SSL",
"Verification",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/HTTP/Reader.php#L252-L258 |
36,206 | CeusMedia/Common | src/UI/HTML/Link.php | UI_HTML_Link.render | public function render()
{
$attributes = $this->getAttributes();
if( is_array( $attributes['href'] ) )
$attributes['href'] = ADT_URL_Inference::buildStatic( $attributes['href'] );
$content = $this->renderInner( $this->content );
if( !is_string( $content ) )
throw new InvalidArgumentException( 'Link label... | php | public function render()
{
$attributes = $this->getAttributes();
if( is_array( $attributes['href'] ) )
$attributes['href'] = ADT_URL_Inference::buildStatic( $attributes['href'] );
$content = $this->renderInner( $this->content );
if( !is_string( $content ) )
throw new InvalidArgumentException( 'Link label... | [
"public",
"function",
"render",
"(",
")",
"{",
"$",
"attributes",
"=",
"$",
"this",
"->",
"getAttributes",
"(",
")",
";",
"if",
"(",
"is_array",
"(",
"$",
"attributes",
"[",
"'href'",
"]",
")",
")",
"$",
"attributes",
"[",
"'href'",
"]",
"=",
"ADT_UR... | Returns rendered Link Element
@access public
@return string | [
"Returns",
"rendered",
"Link",
"Element"
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/HTML/Link.php#L67-L76 |
36,207 | CeusMedia/Common | src/CLI/Fork/Worker/Abstract.php | CLI_Fork_Worker_Abstract.handleSignal | protected function handleSignal( $signalNumber )
{
switch( $signalNumber )
{
case SIGHUP:
$this->handleHangupSignal();
break;
case SIGTERM:
$this->handleTerminationSignal();
break;
default:
$this->handleUnknownSignal();
}
} | php | protected function handleSignal( $signalNumber )
{
switch( $signalNumber )
{
case SIGHUP:
$this->handleHangupSignal();
break;
case SIGTERM:
$this->handleTerminationSignal();
break;
default:
$this->handleUnknownSignal();
}
} | [
"protected",
"function",
"handleSignal",
"(",
"$",
"signalNumber",
")",
"{",
"switch",
"(",
"$",
"signalNumber",
")",
"{",
"case",
"SIGHUP",
":",
"$",
"this",
"->",
"handleHangupSignal",
"(",
")",
";",
"break",
";",
"case",
"SIGTERM",
":",
"$",
"this",
"... | Handle Process Signals.
@access protected
@param int $signalNumber
@return void | [
"Handle",
"Process",
"Signals",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/CLI/Fork/Worker/Abstract.php#L87-L100 |
36,208 | CeusMedia/Common | src/Alg/Object/MethodFactory.php | Alg_Object_MethodFactory.call | public static function call( $mixed, $methodName, $methodParameters = array(), $classParameters = array(), $checkMethod = TRUE, $allowProtected = FALSE )
{
if( is_object( $mixed ) )
return self::callObjectMethod( $mixed, $methodName, $methodParameters, $checkMethod, $allowProtected );
return self::callClassMeth... | php | public static function call( $mixed, $methodName, $methodParameters = array(), $classParameters = array(), $checkMethod = TRUE, $allowProtected = FALSE )
{
if( is_object( $mixed ) )
return self::callObjectMethod( $mixed, $methodName, $methodParameters, $checkMethod, $allowProtected );
return self::callClassMeth... | [
"public",
"static",
"function",
"call",
"(",
"$",
"mixed",
",",
"$",
"methodName",
",",
"$",
"methodParameters",
"=",
"array",
"(",
")",
",",
"$",
"classParameters",
"=",
"array",
"(",
")",
",",
"$",
"checkMethod",
"=",
"TRUE",
",",
"$",
"allowProtected"... | Calls a Method from a Class or Object with Method Parameters and Object Parameters if a Class is given.
@access public
@static
@param string|object $mixed Class Name or Object
@param string $methodName Name of Method to call
@param array $methodParameters List of Parameters for Method Call
@param array ... | [
"Calls",
"a",
"Method",
"from",
"a",
"Class",
"or",
"Object",
"with",
"Method",
"Parameters",
"and",
"Object",
"Parameters",
"if",
"a",
"Class",
"is",
"given",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Alg/Object/MethodFactory.php#L56-L61 |
36,209 | CeusMedia/Common | src/Alg/Object/MethodFactory.php | Alg_Object_MethodFactory.callObjectMethod | public static function callObjectMethod( $object, $methodName, $parameters = array(), $checkMethod = TRUE, $allowProtected = FALSE )
{
if( !is_object( $object ) )
throw new InvalidArgumentException( 'Invalid object' );
$reflection = new ReflectionObject( $object ); // get Object Reflection
if( $c... | php | public static function callObjectMethod( $object, $methodName, $parameters = array(), $checkMethod = TRUE, $allowProtected = FALSE )
{
if( !is_object( $object ) )
throw new InvalidArgumentException( 'Invalid object' );
$reflection = new ReflectionObject( $object ); // get Object Reflection
if( $c... | [
"public",
"static",
"function",
"callObjectMethod",
"(",
"$",
"object",
",",
"$",
"methodName",
",",
"$",
"parameters",
"=",
"array",
"(",
")",
",",
"$",
"checkMethod",
"=",
"TRUE",
",",
"$",
"allowProtected",
"=",
"FALSE",
")",
"{",
"if",
"(",
"!",
"i... | Calls Class or Object Method.
@access public
@static
@param object $object Object to call Method of
@param string $methodName Name of Method to call
@param array $parameters List of Parameters for Method Call
@param boolean $checkMethod Flag: check if methods exists by default, disable for classes ... | [
"Calls",
"Class",
"or",
"Object",
"Method",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Alg/Object/MethodFactory.php#L96-L124 |
36,210 | meritoo/common-library | src/Traits/CssSelector/FormCssSelector.php | FormCssSelector.getInputByNameSelector | public static function getInputByNameSelector($formName, $fieldName)
{
$formSelector = static::getFormByNameSelector($formName);
$fieldName = trim($fieldName);
if (empty($formSelector) || empty($fieldName)) {
return '';
}
return sprintf('%s input[name="%s"]', $f... | php | public static function getInputByNameSelector($formName, $fieldName)
{
$formSelector = static::getFormByNameSelector($formName);
$fieldName = trim($fieldName);
if (empty($formSelector) || empty($fieldName)) {
return '';
}
return sprintf('%s input[name="%s"]', $f... | [
"public",
"static",
"function",
"getInputByNameSelector",
"(",
"$",
"formName",
",",
"$",
"fieldName",
")",
"{",
"$",
"formSelector",
"=",
"static",
"::",
"getFormByNameSelector",
"(",
"$",
"formName",
")",
";",
"$",
"fieldName",
"=",
"trim",
"(",
"$",
"fiel... | Returns selector of the input field based on its name
@param string $formName Name of form (value of the "name" attribute)
@param string $fieldName Name of field (value of the "name" attribute)
@return string | [
"Returns",
"selector",
"of",
"the",
"input",
"field",
"based",
"on",
"its",
"name"
] | b166b8b805ae97c15688d27323cae8976bd0f6dc | https://github.com/meritoo/common-library/blob/b166b8b805ae97c15688d27323cae8976bd0f6dc/src/Traits/CssSelector/FormCssSelector.php#L43-L53 |
36,211 | meritoo/common-library | src/Traits/CssSelector/FormCssSelector.php | FormCssSelector.getInputByIdSelector | public static function getInputByIdSelector($formName, $fieldId)
{
$formSelector = static::getFormByNameSelector($formName);
$fieldId = trim($fieldId);
if (empty($formSelector) || empty($fieldId)) {
return '';
}
return sprintf('%s input#%s', $formSelector, $fiel... | php | public static function getInputByIdSelector($formName, $fieldId)
{
$formSelector = static::getFormByNameSelector($formName);
$fieldId = trim($fieldId);
if (empty($formSelector) || empty($fieldId)) {
return '';
}
return sprintf('%s input#%s', $formSelector, $fiel... | [
"public",
"static",
"function",
"getInputByIdSelector",
"(",
"$",
"formName",
",",
"$",
"fieldId",
")",
"{",
"$",
"formSelector",
"=",
"static",
"::",
"getFormByNameSelector",
"(",
"$",
"formName",
")",
";",
"$",
"fieldId",
"=",
"trim",
"(",
"$",
"fieldId",
... | Returns selector of the input field based on its ID
@param string $formName Name of form (value of the "name" attribute)
@param string $fieldId ID of field (value of the "id" attribute)
@return string | [
"Returns",
"selector",
"of",
"the",
"input",
"field",
"based",
"on",
"its",
"ID"
] | b166b8b805ae97c15688d27323cae8976bd0f6dc | https://github.com/meritoo/common-library/blob/b166b8b805ae97c15688d27323cae8976bd0f6dc/src/Traits/CssSelector/FormCssSelector.php#L62-L72 |
36,212 | meritoo/common-library | src/Traits/CssSelector/FormCssSelector.php | FormCssSelector.getLabelSelector | public static function getLabelSelector($formName, $fieldId)
{
$formSelector = static::getFormByNameSelector($formName);
$fieldId = trim($fieldId);
if (empty($formSelector) || empty($fieldId)) {
return '';
}
return sprintf('%s label[for="%s"]', $formSelector, $f... | php | public static function getLabelSelector($formName, $fieldId)
{
$formSelector = static::getFormByNameSelector($formName);
$fieldId = trim($fieldId);
if (empty($formSelector) || empty($fieldId)) {
return '';
}
return sprintf('%s label[for="%s"]', $formSelector, $f... | [
"public",
"static",
"function",
"getLabelSelector",
"(",
"$",
"formName",
",",
"$",
"fieldId",
")",
"{",
"$",
"formSelector",
"=",
"static",
"::",
"getFormByNameSelector",
"(",
"$",
"formName",
")",
";",
"$",
"fieldId",
"=",
"trim",
"(",
"$",
"fieldId",
")... | Returns selector of label
@param string $formName Name of form (value of the "name" attribute)
@param string $fieldId ID of field (value of the "id" attribute)
@return string | [
"Returns",
"selector",
"of",
"label"
] | b166b8b805ae97c15688d27323cae8976bd0f6dc | https://github.com/meritoo/common-library/blob/b166b8b805ae97c15688d27323cae8976bd0f6dc/src/Traits/CssSelector/FormCssSelector.php#L81-L91 |
36,213 | CeusMedia/Common | src/Alg/Math/Algebra/Matrix.php | Alg_Math_Algebra_Matrix.clear | public function clear( $init = 0 )
{
for( $row = 0; $row < $this->getRowNumber(); $row++ )
for( $column = 0; $column < $this->getColumnNumber(); $column++ )
$this->setValue( $row, $column, $init );
} | php | public function clear( $init = 0 )
{
for( $row = 0; $row < $this->getRowNumber(); $row++ )
for( $column = 0; $column < $this->getColumnNumber(); $column++ )
$this->setValue( $row, $column, $init );
} | [
"public",
"function",
"clear",
"(",
"$",
"init",
"=",
"0",
")",
"{",
"for",
"(",
"$",
"row",
"=",
"0",
";",
"$",
"row",
"<",
"$",
"this",
"->",
"getRowNumber",
"(",
")",
";",
"$",
"row",
"++",
")",
"for",
"(",
"$",
"column",
"=",
"0",
";",
... | Clears Matrix by setting initial value.
@access public
@param int $init initial values in Matrix
@return void | [
"Clears",
"Matrix",
"by",
"setting",
"initial",
"value",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Alg/Math/Algebra/Matrix.php#L81-L86 |
36,214 | CeusMedia/Common | src/Alg/Math/Algebra/Matrix.php | Alg_Math_Algebra_Matrix.getColumn | public function getColumn( $column )
{
if( $column < 0 || $column >= $this->getColumnNumber() )
throw new OutOfRangeException( 'Column key "'.$column.'" is not valid.' );
$values = array();
for( $row = 0; $row < $this->getRowNumber(); $row++ )
$values[] = $this->getValue( $row, $column );
return n... | php | public function getColumn( $column )
{
if( $column < 0 || $column >= $this->getColumnNumber() )
throw new OutOfRangeException( 'Column key "'.$column.'" is not valid.' );
$values = array();
for( $row = 0; $row < $this->getRowNumber(); $row++ )
$values[] = $this->getValue( $row, $column );
return n... | [
"public",
"function",
"getColumn",
"(",
"$",
"column",
")",
"{",
"if",
"(",
"$",
"column",
"<",
"0",
"||",
"$",
"column",
">=",
"$",
"this",
"->",
"getColumnNumber",
"(",
")",
")",
"throw",
"new",
"OutOfRangeException",
"(",
"'Column key \"'",
".",
"$",
... | Returns a column as Vector.
@access public
@param int $column Column Index
@return Alg_Math_Algebra_Vector | [
"Returns",
"a",
"column",
"as",
"Vector",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Alg/Math/Algebra/Matrix.php#L94-L102 |
36,215 | CeusMedia/Common | src/Alg/Math/Algebra/Matrix.php | Alg_Math_Algebra_Matrix.getRow | public function getRow( $row )
{
if( $row < 0 || $row >= $this->getRowNumber() )
throw new OutOfRangeException( 'Row key "'.$row.'" is not valid.' );
return new Alg_Math_Algebra_Vector( $this->values[$row] );
} | php | public function getRow( $row )
{
if( $row < 0 || $row >= $this->getRowNumber() )
throw new OutOfRangeException( 'Row key "'.$row.'" is not valid.' );
return new Alg_Math_Algebra_Vector( $this->values[$row] );
} | [
"public",
"function",
"getRow",
"(",
"$",
"row",
")",
"{",
"if",
"(",
"$",
"row",
"<",
"0",
"||",
"$",
"row",
">=",
"$",
"this",
"->",
"getRowNumber",
"(",
")",
")",
"throw",
"new",
"OutOfRangeException",
"(",
"'Row key \"'",
".",
"$",
"row",
".",
... | Returns a row as Vector.
@access public
@param int $row Row Index
@return Alg_Math_Algebra_Vector | [
"Returns",
"a",
"row",
"as",
"Vector",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Alg/Math/Algebra/Matrix.php#L120-L125 |
36,216 | CeusMedia/Common | src/Alg/Math/Algebra/Matrix.php | Alg_Math_Algebra_Matrix.swapColumns | public function swapColumns( $column1, $column2 )
{
if( $column1 < 0 || $column1 >= $this->getColumnNumber() )
throw new OutOfRangeException( 'Column key "'.$column1.'" is not valid.' );
if( $column2 < 0 || $column2 >= $this->getColumnNumber() )
throw new OutOfRangeException( 'Column key "'.$column2.'" ... | php | public function swapColumns( $column1, $column2 )
{
if( $column1 < 0 || $column1 >= $this->getColumnNumber() )
throw new OutOfRangeException( 'Column key "'.$column1.'" is not valid.' );
if( $column2 < 0 || $column2 >= $this->getColumnNumber() )
throw new OutOfRangeException( 'Column key "'.$column2.'" ... | [
"public",
"function",
"swapColumns",
"(",
"$",
"column1",
",",
"$",
"column2",
")",
"{",
"if",
"(",
"$",
"column1",
"<",
"0",
"||",
"$",
"column1",
">=",
"$",
"this",
"->",
"getColumnNumber",
"(",
")",
")",
"throw",
"new",
"OutOfRangeException",
"(",
"... | Swaps 2 Columns within Matrix.
@access public
@param int $column1 Index of Source Column
@param int $column2 Index of Target Column
@return void | [
"Swaps",
"2",
"Columns",
"within",
"Matrix",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Alg/Math/Algebra/Matrix.php#L177-L190 |
36,217 | CeusMedia/Common | src/Alg/Math/Algebra/Matrix.php | Alg_Math_Algebra_Matrix.swapRows | public function swapRows( $row1, $row2 )
{
if( $row1 < 0 || $row1 >= $this->getRowNumber() )
throw new OutOfRangeException( 'Source Row key "'.$row1.'" is not valid.' );
if( $row2 < 0 || $row2 >= $this->getRowNumber() )
throw new OutOfRangeException( 'Target Row key "'.$row2.'" is not valid.' );
$b... | php | public function swapRows( $row1, $row2 )
{
if( $row1 < 0 || $row1 >= $this->getRowNumber() )
throw new OutOfRangeException( 'Source Row key "'.$row1.'" is not valid.' );
if( $row2 < 0 || $row2 >= $this->getRowNumber() )
throw new OutOfRangeException( 'Target Row key "'.$row2.'" is not valid.' );
$b... | [
"public",
"function",
"swapRows",
"(",
"$",
"row1",
",",
"$",
"row2",
")",
"{",
"if",
"(",
"$",
"row1",
"<",
"0",
"||",
"$",
"row1",
">=",
"$",
"this",
"->",
"getRowNumber",
"(",
")",
")",
"throw",
"new",
"OutOfRangeException",
"(",
"'Source Row key \"... | Swaps 2 Rows within Matrix.
@access public
@param int $row1 Index of Source Row
@param int $row2 Index of Target Row
@return void | [
"Swaps",
"2",
"Rows",
"within",
"Matrix",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Alg/Math/Algebra/Matrix.php#L199-L209 |
36,218 | CeusMedia/Common | src/Alg/Math/Algebra/Matrix.php | Alg_Math_Algebra_Matrix.transpose | public function transpose()
{
$array = array();
$rowNumber = $this->getRowNumber();
$columnNumber = $this->getColumnNumber();
for( $row = 0; $row < $rowNumber; $row++ )
for( $column = 0; $column < $columnNumber; $column++ )
$array[$column][$row] = $this->values[$row][$column];
$this->rowNumbe... | php | public function transpose()
{
$array = array();
$rowNumber = $this->getRowNumber();
$columnNumber = $this->getColumnNumber();
for( $row = 0; $row < $rowNumber; $row++ )
for( $column = 0; $column < $columnNumber; $column++ )
$array[$column][$row] = $this->values[$row][$column];
$this->rowNumbe... | [
"public",
"function",
"transpose",
"(",
")",
"{",
"$",
"array",
"=",
"array",
"(",
")",
";",
"$",
"rowNumber",
"=",
"$",
"this",
"->",
"getRowNumber",
"(",
")",
";",
"$",
"columnNumber",
"=",
"$",
"this",
"->",
"getColumnNumber",
"(",
")",
";",
"for"... | Returns transposed Matrix.
@access public
@return Alg_Math_Algebra_Matrix | [
"Returns",
"transposed",
"Matrix",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Alg/Math/Algebra/Matrix.php#L245-L256 |
36,219 | CeusMedia/Common | src/UI/HTML/Exception/TraceViewer.php | UI_HTML_Exception_TraceViewer.convertArrayToString | protected static function convertArrayToString( $array, $breakMode, $level = 1 )
{
$list = array();
foreach( $array as $key => $value )
{
$string = self::convertArgumentToString( $value, $breakMode, $level+1 );
$list[] = $key.":".$string;
}
$block = implode( ", ", $list );
if( $breakMode == 2 )
{
... | php | protected static function convertArrayToString( $array, $breakMode, $level = 1 )
{
$list = array();
foreach( $array as $key => $value )
{
$string = self::convertArgumentToString( $value, $breakMode, $level+1 );
$list[] = $key.":".$string;
}
$block = implode( ", ", $list );
if( $breakMode == 2 )
{
... | [
"protected",
"static",
"function",
"convertArrayToString",
"(",
"$",
"array",
",",
"$",
"breakMode",
",",
"$",
"level",
"=",
"1",
")",
"{",
"$",
"list",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"array",
"as",
"$",
"key",
"=>",
"$",
"value",
... | Converts Array to String.
@access protected
@static
@param array $array Array to convert to String
@return string | [
"Converts",
"Array",
"to",
"String",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/HTML/Exception/TraceViewer.php#L208-L229 |
36,220 | CeusMedia/Common | src/Net/Connectivity.php | Net_Connectivity.check | public function check( $method = NULL ){
$method = $this->method;
if( $method && $this->validateMethod( $method ) )
$method = $method;
$currentStatus = $this->status;
switch( $method ){
case self::METHOD_SOCKET:
$this->checkUsingSocket();
break;
case self::METHOD_PING:
$this->checkUsingS... | php | public function check( $method = NULL ){
$method = $this->method;
if( $method && $this->validateMethod( $method ) )
$method = $method;
$currentStatus = $this->status;
switch( $method ){
case self::METHOD_SOCKET:
$this->checkUsingSocket();
break;
case self::METHOD_PING:
$this->checkUsingS... | [
"public",
"function",
"check",
"(",
"$",
"method",
"=",
"NULL",
")",
"{",
"$",
"method",
"=",
"$",
"this",
"->",
"method",
";",
"if",
"(",
"$",
"method",
"&&",
"$",
"this",
"->",
"validateMethod",
"(",
"$",
"method",
")",
")",
"$",
"method",
"=",
... | ...
Executes callback function by if set and status has changed.
@access public
@param integer $method Method to use for checking
@return void
@throws \RangeException if given method is unsupported | [
"...",
"Executes",
"callback",
"function",
"by",
"if",
"set",
"and",
"status",
"has",
"changed",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/Connectivity.php#L67-L85 |
36,221 | CeusMedia/Common | src/Net/Connectivity.php | Net_Connectivity.checkUsingSocket | public function checkUsingSocket(){
$conn = @fsockopen( 'google.com', 443);
$this->status = $conn ? self::STATUS_ONLINE : self::STATUS_OFFLINE;
fclose( $conn );
} | php | public function checkUsingSocket(){
$conn = @fsockopen( 'google.com', 443);
$this->status = $conn ? self::STATUS_ONLINE : self::STATUS_OFFLINE;
fclose( $conn );
} | [
"public",
"function",
"checkUsingSocket",
"(",
")",
"{",
"$",
"conn",
"=",
"@",
"fsockopen",
"(",
"'google.com'",
",",
"443",
")",
";",
"$",
"this",
"->",
"status",
"=",
"$",
"conn",
"?",
"self",
"::",
"STATUS_ONLINE",
":",
"self",
"::",
"STATUS_OFFLINE"... | Check connectivity using a socket connection.
Sets status depending on result.
@access public
@return void | [
"Check",
"connectivity",
"using",
"a",
"socket",
"connection",
".",
"Sets",
"status",
"depending",
"on",
"result",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/Connectivity.php#L93-L97 |
36,222 | CeusMedia/Common | src/Net/Connectivity.php | Net_Connectivity.checkUsingSystemPing | public function checkUsingSystemPing(){
$response = NULL;
@exec( "ping -c 1 google.com 2>&1 1> /dev/null", $response, $code );
// @system( "ping -c 1 1111google.com &2>1 &1>/dev/null", $code );
if( $code == 0 )
$this->status = self::STATUS_ONLINE;
else
$this->status = self::STATUS_OFFLINE;
} | php | public function checkUsingSystemPing(){
$response = NULL;
@exec( "ping -c 1 google.com 2>&1 1> /dev/null", $response, $code );
// @system( "ping -c 1 1111google.com &2>1 &1>/dev/null", $code );
if( $code == 0 )
$this->status = self::STATUS_ONLINE;
else
$this->status = self::STATUS_OFFLINE;
} | [
"public",
"function",
"checkUsingSystemPing",
"(",
")",
"{",
"$",
"response",
"=",
"NULL",
";",
"@",
"exec",
"(",
"\"ping -c 1 google.com 2>&1 1> /dev/null\"",
",",
"$",
"response",
",",
"$",
"code",
")",
";",
"//\t\t@system( \"ping -c 1 1111google.com &2>1 &1>/dev/null... | Check connectivity using ping via system call.
Sets status depending on result.
@access public
@return void | [
"Check",
"connectivity",
"using",
"ping",
"via",
"system",
"call",
".",
"Sets",
"status",
"depending",
"on",
"result",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/Connectivity.php#L105-L113 |
36,223 | CeusMedia/Common | src/Net/Connectivity.php | Net_Connectivity.validateMethod | protected function validateMethod( $method ){
if( !is_int( $method ) )
throw new \InvalidArgumentException( 'Method must be integer' );
if( !in_array( $method, array( self::METHOD_SOCKET, self::METHOD_PING ) ) )
throw new \RangeException( 'Invalid method' );
return $method;
} | php | protected function validateMethod( $method ){
if( !is_int( $method ) )
throw new \InvalidArgumentException( 'Method must be integer' );
if( !in_array( $method, array( self::METHOD_SOCKET, self::METHOD_PING ) ) )
throw new \RangeException( 'Invalid method' );
return $method;
} | [
"protected",
"function",
"validateMethod",
"(",
"$",
"method",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"method",
")",
")",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Method must be integer'",
")",
";",
"if",
"(",
"!",
"in_array",
"(",
"... | Validate given method.
@acess protected
@param integer Method to validate
@return integer Method after validation | [
"Validate",
"given",
"method",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/Connectivity.php#L189-L195 |
36,224 | CeusMedia/Common | src/Alg/Math/Analysis/Integration.php | Alg_Math_Analysis_Integration.getSamplingNodes | public function getSamplingNodes()
{
$nodes = array();
$start = $this->interval->getStart();
$distance = $this->getNodeDistance();
for( $i = 0; $i<$this->getNodes(); $i++ )
{
$x = $start + $i * $distance;
$nodes[] = $x;
}
return $nodes;
} | php | public function getSamplingNodes()
{
$nodes = array();
$start = $this->interval->getStart();
$distance = $this->getNodeDistance();
for( $i = 0; $i<$this->getNodes(); $i++ )
{
$x = $start + $i * $distance;
$nodes[] = $x;
}
return $nodes;
} | [
"public",
"function",
"getSamplingNodes",
"(",
")",
"{",
"$",
"nodes",
"=",
"array",
"(",
")",
";",
"$",
"start",
"=",
"$",
"this",
"->",
"interval",
"->",
"getStart",
"(",
")",
";",
"$",
"distance",
"=",
"$",
"this",
"->",
"getNodeDistance",
"(",
")... | Returns an array of Sampling Nodes.
@access public
@return array | [
"Returns",
"an",
"array",
"of",
"Sampling",
"Nodes",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Alg/Math/Analysis/Integration.php#L116-L127 |
36,225 | ncou/Chiron | src/Chiron/Http/Middleware/EncryptCookiesMiddleware.php | EncryptCookiesMiddleware.process | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$request = $this->withDecryptedCookies($request);
$response = $handler->handle($request);
return $this->withEncryptedCookies($response);
} | php | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$request = $this->withDecryptedCookies($request);
$response = $handler->handle($request);
return $this->withEncryptedCookies($response);
} | [
"public",
"function",
"process",
"(",
"ServerRequestInterface",
"$",
"request",
",",
"RequestHandlerInterface",
"$",
"handler",
")",
":",
"ResponseInterface",
"{",
"$",
"request",
"=",
"$",
"this",
"->",
"withDecryptedCookies",
"(",
"$",
"request",
")",
";",
"$"... | Start the session, delegate the request processing and add the session cookie to the response.
@param ServerRequestInterface $request
@param RequestHandlerInterface $handler
@return ResponseInterface | [
"Start",
"the",
"session",
"delegate",
"the",
"request",
"processing",
"and",
"add",
"the",
"session",
"cookie",
"to",
"the",
"response",
"."
] | bfb6f85faba0e54005896b09a7c34e456d1a1bed | https://github.com/ncou/Chiron/blob/bfb6f85faba0e54005896b09a7c34e456d1a1bed/src/Chiron/Http/Middleware/EncryptCookiesMiddleware.php#L50-L56 |
36,226 | ncou/Chiron | src/Chiron/Http/Middleware/EncryptCookiesMiddleware.php | EncryptCookiesMiddleware.withDecryptedCookies | private function withDecryptedCookies(ServerRequestInterface $request): ServerRequestInterface
{
$cookies = $request->getCookieParams();
$decrypted = [];
foreach ($cookies as $name => $value) {
$decrypted[$name] = in_array($name, $this->bypassed) ? $value : $this->decrypt($value... | php | private function withDecryptedCookies(ServerRequestInterface $request): ServerRequestInterface
{
$cookies = $request->getCookieParams();
$decrypted = [];
foreach ($cookies as $name => $value) {
$decrypted[$name] = in_array($name, $this->bypassed) ? $value : $this->decrypt($value... | [
"private",
"function",
"withDecryptedCookies",
"(",
"ServerRequestInterface",
"$",
"request",
")",
":",
"ServerRequestInterface",
"{",
"$",
"cookies",
"=",
"$",
"request",
"->",
"getCookieParams",
"(",
")",
";",
"$",
"decrypted",
"=",
"[",
"]",
";",
"foreach",
... | Decrypt the non bypassed cookie values attached to the given request and return a new request with those values.
@param ServerRequestInterface $request
@return ServerRequestInterface | [
"Decrypt",
"the",
"non",
"bypassed",
"cookie",
"values",
"attached",
"to",
"the",
"given",
"request",
"and",
"return",
"a",
"new",
"request",
"with",
"those",
"values",
"."
] | bfb6f85faba0e54005896b09a7c34e456d1a1bed | https://github.com/ncou/Chiron/blob/bfb6f85faba0e54005896b09a7c34e456d1a1bed/src/Chiron/Http/Middleware/EncryptCookiesMiddleware.php#L65-L75 |
36,227 | ncou/Chiron | src/Chiron/Http/Middleware/EncryptCookiesMiddleware.php | EncryptCookiesMiddleware.withEncryptedCookies | protected function withEncryptedCookies(ResponseInterface $response): ResponseInterface
{
//$cookiesManager = new CookiesManager();
//$cookies = CookiesManager::parseHeaders($response->getHeader('Set-Cookie'));
$cookies = CookiesManager::parseSetCookieHeader($response->getHeader('Set-Cookie... | php | protected function withEncryptedCookies(ResponseInterface $response): ResponseInterface
{
//$cookiesManager = new CookiesManager();
//$cookies = CookiesManager::parseHeaders($response->getHeader('Set-Cookie'));
$cookies = CookiesManager::parseSetCookieHeader($response->getHeader('Set-Cookie... | [
"protected",
"function",
"withEncryptedCookies",
"(",
"ResponseInterface",
"$",
"response",
")",
":",
"ResponseInterface",
"{",
"//$cookiesManager = new CookiesManager();",
"//$cookies = CookiesManager::parseHeaders($response->getHeader('Set-Cookie'));",
"$",
"cookies",
"=",
"Cookies... | Encode cookies from a response's Set-Cookie header.
@param ResponseInterface $response The response to encode cookies in.
@return ResponseInterface Updated response with encoded cookies. | [
"Encode",
"cookies",
"from",
"a",
"response",
"s",
"Set",
"-",
"Cookie",
"header",
"."
] | bfb6f85faba0e54005896b09a7c34e456d1a1bed | https://github.com/ncou/Chiron/blob/bfb6f85faba0e54005896b09a7c34e456d1a1bed/src/Chiron/Http/Middleware/EncryptCookiesMiddleware.php#L84-L106 |
36,228 | ncou/Chiron | src/Chiron/Http/Middleware/EncryptCookiesMiddleware.php | EncryptCookiesMiddleware.decrypt | private function decrypt(string $value): string
{
try {
return CryptEngine::decrypt($value, $this->password);
} catch (\Throwable $t) {
// @TODO : Add a silent log message if there is an error in the cookie decrypt function.
return '';
}
} | php | private function decrypt(string $value): string
{
try {
return CryptEngine::decrypt($value, $this->password);
} catch (\Throwable $t) {
// @TODO : Add a silent log message if there is an error in the cookie decrypt function.
return '';
}
} | [
"private",
"function",
"decrypt",
"(",
"string",
"$",
"value",
")",
":",
"string",
"{",
"try",
"{",
"return",
"CryptEngine",
"::",
"decrypt",
"(",
"$",
"value",
",",
"$",
"this",
"->",
"password",
")",
";",
"}",
"catch",
"(",
"\\",
"Throwable",
"$",
... | Decrypt the given value using the key.
Return default to blank string when the key is wrong or the cypher text has been modified.
@param string $value
@return string | [
"Decrypt",
"the",
"given",
"value",
"using",
"the",
"key",
".",
"Return",
"default",
"to",
"blank",
"string",
"when",
"the",
"key",
"is",
"wrong",
"or",
"the",
"cypher",
"text",
"has",
"been",
"modified",
"."
] | bfb6f85faba0e54005896b09a7c34e456d1a1bed | https://github.com/ncou/Chiron/blob/bfb6f85faba0e54005896b09a7c34e456d1a1bed/src/Chiron/Http/Middleware/EncryptCookiesMiddleware.php#L128-L136 |
36,229 | CeusMedia/Common | src/ADT/Multiplexer.php | ADT_Multiplexer.proceed | public function proceed()
{
if( $this->getType() == 1 )
{
$output = $this->controls[0] ? $this->inputs[1] : $this->inputs[0];
}
else if( $this->getType() == 2 )
{
$mux = new ADT_Multiplexer();
$mux->setControls( $this->controls[0] );
$mux->setInputs( $this->inputs[0], $this->inputs[1] )... | php | public function proceed()
{
if( $this->getType() == 1 )
{
$output = $this->controls[0] ? $this->inputs[1] : $this->inputs[0];
}
else if( $this->getType() == 2 )
{
$mux = new ADT_Multiplexer();
$mux->setControls( $this->controls[0] );
$mux->setInputs( $this->inputs[0], $this->inputs[1] )... | [
"public",
"function",
"proceed",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getType",
"(",
")",
"==",
"1",
")",
"{",
"$",
"output",
"=",
"$",
"this",
"->",
"controls",
"[",
"0",
"]",
"?",
"$",
"this",
"->",
"inputs",
"[",
"1",
"]",
":",
"$... | Runs Multiplexer.
@access public
@return mixed | [
"Runs",
"Multiplexer",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/ADT/Multiplexer.php#L98-L133 |
36,230 | CeusMedia/Common | src/ADT/Multiplexer.php | ADT_Multiplexer.setControls | public function setControls()
{
$this->controls = array();
$args = func_get_args();
for( $i = 0; $i < $this->type; $i ++ )
if( isset( $args[$i] ) )
$this->controls[$i] = $args[$i];
} | php | public function setControls()
{
$this->controls = array();
$args = func_get_args();
for( $i = 0; $i < $this->type; $i ++ )
if( isset( $args[$i] ) )
$this->controls[$i] = $args[$i];
} | [
"public",
"function",
"setControls",
"(",
")",
"{",
"$",
"this",
"->",
"controls",
"=",
"array",
"(",
")",
";",
"$",
"args",
"=",
"func_get_args",
"(",
")",
";",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"$",
"this",
"->",
"type",
";"... | Sets Controls from Method Arguments.
@access public
@return void | [
"Sets",
"Controls",
"from",
"Method",
"Arguments",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/ADT/Multiplexer.php#L140-L147 |
36,231 | CeusMedia/Common | src/ADT/Multiplexer.php | ADT_Multiplexer.setInputs | public function setInputs()
{
$this->inputs = array();
$len = pow( 2, $this->type );
$args = func_get_args();
for( $i = 0; $i < $len; $i ++ )
if( isset( $args[$i] ) )
$this->inputs[$i] = $args[$i];
} | php | public function setInputs()
{
$this->inputs = array();
$len = pow( 2, $this->type );
$args = func_get_args();
for( $i = 0; $i < $len; $i ++ )
if( isset( $args[$i] ) )
$this->inputs[$i] = $args[$i];
} | [
"public",
"function",
"setInputs",
"(",
")",
"{",
"$",
"this",
"->",
"inputs",
"=",
"array",
"(",
")",
";",
"$",
"len",
"=",
"pow",
"(",
"2",
",",
"$",
"this",
"->",
"type",
")",
";",
"$",
"args",
"=",
"func_get_args",
"(",
")",
";",
"for",
"("... | Sets Inputs from Method Arguments.
@access public
@return void | [
"Sets",
"Inputs",
"from",
"Method",
"Arguments",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/ADT/Multiplexer.php#L154-L162 |
36,232 | CeusMedia/Common | src/Exception/Validation.php | Exception_Validation.serialize | public function serialize()
{
return serialize( array( $this->message, $this->code, $this->file, $this->line, $this->errors, $this->form ) );
} | php | public function serialize()
{
return serialize( array( $this->message, $this->code, $this->file, $this->line, $this->errors, $this->form ) );
} | [
"public",
"function",
"serialize",
"(",
")",
"{",
"return",
"serialize",
"(",
"array",
"(",
"$",
"this",
"->",
"message",
",",
"$",
"this",
"->",
"code",
",",
"$",
"this",
"->",
"file",
",",
"$",
"this",
"->",
"line",
",",
"$",
"this",
"->",
"error... | Returns serial of exception.
@access public
@return string | [
"Returns",
"serial",
"of",
"exception",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Exception/Validation.php#L88-L91 |
36,233 | CeusMedia/Common | src/Net/HTTP/Status.php | Net_HTTP_Status.sendHeader | static public function sendHeader( $code, $protocol = "HTTP/1.0" ){
$text = self::getText( $code );
header( $protocol.' '.$code.' '.$text );
} | php | static public function sendHeader( $code, $protocol = "HTTP/1.0" ){
$text = self::getText( $code );
header( $protocol.' '.$code.' '.$text );
} | [
"static",
"public",
"function",
"sendHeader",
"(",
"$",
"code",
",",
"$",
"protocol",
"=",
"\"HTTP/1.0\"",
")",
"{",
"$",
"text",
"=",
"self",
"::",
"getText",
"(",
"$",
"code",
")",
";",
"header",
"(",
"$",
"protocol",
".",
"' '",
".",
"$",
"code",
... | Sends HTTP header with status code and text.
@access public
@param integer $code HTTP status code to send
@param string $protocol HTTP protocol, default: HTTP/1.0
@return void | [
"Sends",
"HTTP",
"header",
"with",
"status",
"code",
"and",
"text",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/HTTP/Status.php#L158-L161 |
36,234 | ncou/Chiron | src/Chiron/Routing/Route.php | Route.validateHttpMethods | private function validateHttpMethods(array $methods): array
{
if (empty($methods)) {
throw new InvalidArgumentException(
'HTTP methods argument was empty; must contain at least one method'
);
}
if (false === array_reduce($methods, function ($valid, $me... | php | private function validateHttpMethods(array $methods): array
{
if (empty($methods)) {
throw new InvalidArgumentException(
'HTTP methods argument was empty; must contain at least one method'
);
}
if (false === array_reduce($methods, function ($valid, $me... | [
"private",
"function",
"validateHttpMethods",
"(",
"array",
"$",
"methods",
")",
":",
"array",
"{",
"if",
"(",
"empty",
"(",
"$",
"methods",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'HTTP methods argument was empty; must contain at least one me... | Validate the provided HTTP method names.
Validates, and then normalizes to upper case.
@param string[] An array of HTTP method names.
@throws Exception InvalidArgumentException for any invalid method names.
@return string[] | [
"Validate",
"the",
"provided",
"HTTP",
"method",
"names",
"."
] | bfb6f85faba0e54005896b09a7c34e456d1a1bed | https://github.com/ncou/Chiron/blob/bfb6f85faba0e54005896b09a7c34e456d1a1bed/src/Chiron/Routing/Route.php#L403-L428 |
36,235 | CeusMedia/Common | src/Loader.php | Loader.registerNew | public static function registerNew( $extensions = NULL, $prefix = NULL, $path = NULL, $logFile = NULL, $verbose = 0 )
{
$loader = new Loader( $extensions, $prefix, $path, $logFile );
$loader->setVerbose( (int) $verbose );
$loader->registerAutoloader();
return $loader;
} | php | public static function registerNew( $extensions = NULL, $prefix = NULL, $path = NULL, $logFile = NULL, $verbose = 0 )
{
$loader = new Loader( $extensions, $prefix, $path, $logFile );
$loader->setVerbose( (int) $verbose );
$loader->registerAutoloader();
return $loader;
} | [
"public",
"static",
"function",
"registerNew",
"(",
"$",
"extensions",
"=",
"NULL",
",",
"$",
"prefix",
"=",
"NULL",
",",
"$",
"path",
"=",
"NULL",
",",
"$",
"logFile",
"=",
"NULL",
",",
"$",
"verbose",
"=",
"0",
")",
"{",
"$",
"loader",
"=",
"new"... | Register new Autoloader statically.
@static
@access public
@param mixed $extensions String or List of supported Class File Extensions
@param string $prefix Prefix of Classes
@param string $path Path to Classes
@param string $logFile Path to autoload log file
@param boolean $verbose Verbosity: 0 - quie... | [
"Register",
"new",
"Autoloader",
"statically",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Loader.php#L71-L77 |
36,236 | CeusMedia/Common | src/Loader.php | Loader.loadClass | public function loadClass( $className )
{
if( $this->prefix )
{
$prefix = strtolower( substr( $className, 0, strlen( $this->prefix ) ) );
if( $prefix != $this->prefix )
return FALSE;
$className = str_ireplace( $this->prefix, '', $className );
}
$basePath = $this->path ? $this->path : "";
if( $t... | php | public function loadClass( $className )
{
if( $this->prefix )
{
$prefix = strtolower( substr( $className, 0, strlen( $this->prefix ) ) );
if( $prefix != $this->prefix )
return FALSE;
$className = str_ireplace( $this->prefix, '', $className );
}
$basePath = $this->path ? $this->path : "";
if( $t... | [
"public",
"function",
"loadClass",
"(",
"$",
"className",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"prefix",
")",
"{",
"$",
"prefix",
"=",
"strtolower",
"(",
"substr",
"(",
"$",
"className",
",",
"0",
",",
"strlen",
"(",
"$",
"this",
"->",
"prefix",
... | Try to load a Class by its Class Name.
@access public
@param string $className Class Name with encoded Path
@return bool | [
"Try",
"to",
"load",
"a",
"Class",
"by",
"its",
"Class",
"Name",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Loader.php#L85-L120 |
36,237 | CeusMedia/Common | src/Loader.php | Loader.loadFile | public function loadFile( $fileName, $once = FALSE )
{
$this->logLoadedFile( $fileName );
if( $once )
include_once $fileName;
else
include $fileName;
if( $this->verbose > 0 )
echo $this->lineBreak."load: ".$fileName;
} | php | public function loadFile( $fileName, $once = FALSE )
{
$this->logLoadedFile( $fileName );
if( $once )
include_once $fileName;
else
include $fileName;
if( $this->verbose > 0 )
echo $this->lineBreak."load: ".$fileName;
} | [
"public",
"function",
"loadFile",
"(",
"$",
"fileName",
",",
"$",
"once",
"=",
"FALSE",
")",
"{",
"$",
"this",
"->",
"logLoadedFile",
"(",
"$",
"fileName",
")",
";",
"if",
"(",
"$",
"once",
")",
"include_once",
"$",
"fileName",
";",
"else",
"include",
... | Try to load a File by its File Name.
@access public
@param string $fileName File Name, absolute or relative
@param bool $once Flag: Load once only
@return void | [
"Try",
"to",
"load",
"a",
"File",
"by",
"its",
"File",
"Name",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Loader.php#L129-L138 |
36,238 | CeusMedia/Common | src/Loader.php | Loader.setPath | public function setPath( $path )
{
# if( $path && !file_exists( $path ) )
# throw new RuntimeException( 'Invalid path' );
$path = str_replace( DIRECTORY_SEPARATOR, "/", $path );
$path = preg_replace( "@(.+)/$@", "\\1", $path )."/";
$this->path = $path;
} | php | public function setPath( $path )
{
# if( $path && !file_exists( $path ) )
# throw new RuntimeException( 'Invalid path' );
$path = str_replace( DIRECTORY_SEPARATOR, "/", $path );
$path = preg_replace( "@(.+)/$@", "\\1", $path )."/";
$this->path = $path;
} | [
"public",
"function",
"setPath",
"(",
"$",
"path",
")",
"{",
"#\t\tif( $path && !file_exists( $path ) )",
"#\t\t\tthrow new RuntimeException( 'Invalid path' );",
"$",
"path",
"=",
"str_replace",
"(",
"DIRECTORY_SEPARATOR",
",",
"\"/\"",
",",
"$",
"path",
")",
";",
"$",
... | Sets Path to load Files from to force absolute File Names.
@access public
@param string $path Path to load Files from, empty to remove set Path
@return void
@throws RuntimeException if Path is not existing | [
"Sets",
"Path",
"to",
"load",
"Files",
"from",
"to",
"force",
"absolute",
"File",
"Names",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Loader.php#L211-L218 |
36,239 | Assasz/yggdrasil | src/Yggdrasil/Core/Controller/ApiController.php | ApiController.fromBody | protected function fromBody(string $key)
{
$dataCollection = $this->parseBody();
if (!$this->inBody([$key])) {
throw new \InvalidArgumentException('Data with key ' . $key . ' doesn\'t exist in request body.');
}
return $dataCollection[$key];
} | php | protected function fromBody(string $key)
{
$dataCollection = $this->parseBody();
if (!$this->inBody([$key])) {
throw new \InvalidArgumentException('Data with key ' . $key . ' doesn\'t exist in request body.');
}
return $dataCollection[$key];
} | [
"protected",
"function",
"fromBody",
"(",
"string",
"$",
"key",
")",
"{",
"$",
"dataCollection",
"=",
"$",
"this",
"->",
"parseBody",
"(",
")",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"inBody",
"(",
"[",
"$",
"key",
"]",
")",
")",
"{",
"throw",
"... | Returns request body data specified by key
@param string $key
@return mixed
@throws \InvalidArgumentException if data specified by key doesn't exist | [
"Returns",
"request",
"body",
"data",
"specified",
"by",
"key"
] | bee9bef7713b85799cdd3e9b23dccae33154f3b3 | https://github.com/Assasz/yggdrasil/blob/bee9bef7713b85799cdd3e9b23dccae33154f3b3/src/Yggdrasil/Core/Controller/ApiController.php#L63-L72 |
36,240 | Assasz/yggdrasil | src/Yggdrasil/Core/Controller/ApiController.php | ApiController.parseBody | protected function parseBody(): array
{
if ($this->getRequest()->headers->get('Content-Type') === 'application/json') {
$dataCollection = json_decode($this->getRequest()->getContent(), true);
} else {
if ($this->getRequest()->isMethod('POST')) {
$dataCollectio... | php | protected function parseBody(): array
{
if ($this->getRequest()->headers->get('Content-Type') === 'application/json') {
$dataCollection = json_decode($this->getRequest()->getContent(), true);
} else {
if ($this->getRequest()->isMethod('POST')) {
$dataCollectio... | [
"protected",
"function",
"parseBody",
"(",
")",
":",
"array",
"{",
"if",
"(",
"$",
"this",
"->",
"getRequest",
"(",
")",
"->",
"headers",
"->",
"get",
"(",
"'Content-Type'",
")",
"===",
"'application/json'",
")",
"{",
"$",
"dataCollection",
"=",
"json_deco... | Parses request body into array
@return array | [
"Parses",
"request",
"body",
"into",
"array"
] | bee9bef7713b85799cdd3e9b23dccae33154f3b3 | https://github.com/Assasz/yggdrasil/blob/bee9bef7713b85799cdd3e9b23dccae33154f3b3/src/Yggdrasil/Core/Controller/ApiController.php#L90-L106 |
36,241 | Assasz/yggdrasil | src/Yggdrasil/Core/Controller/ApiController.php | ApiController.renderPartial | protected function renderPartial(string $view, array $params = []): string
{
$this->getTemplateEngine()->addGlobal('_request', $this->getRequest());
return $this->getTemplateEngine()->render($view, $params);
} | php | protected function renderPartial(string $view, array $params = []): string
{
$this->getTemplateEngine()->addGlobal('_request', $this->getRequest());
return $this->getTemplateEngine()->render($view, $params);
} | [
"protected",
"function",
"renderPartial",
"(",
"string",
"$",
"view",
",",
"array",
"$",
"params",
"=",
"[",
"]",
")",
":",
"string",
"{",
"$",
"this",
"->",
"getTemplateEngine",
"(",
")",
"->",
"addGlobal",
"(",
"'_request'",
",",
"$",
"this",
"->",
"... | Renders partial view
@param string $view Name of view file
@param array $params Parameters supposed to be passed to the view
@return string | [
"Renders",
"partial",
"view"
] | bee9bef7713b85799cdd3e9b23dccae33154f3b3 | https://github.com/Assasz/yggdrasil/blob/bee9bef7713b85799cdd3e9b23dccae33154f3b3/src/Yggdrasil/Core/Controller/ApiController.php#L115-L120 |
36,242 | CeusMedia/Common | src/UI/HTML/Elements.php | UI_HTML_Elements.RadioLabel | public static function RadioLabel( $name, $label, $value, $checked = NULL, $class = NULL, $readOnly = NULL )
{
$radio = UI_HTML_Elements::Radio( $name, $value, $checked, $class, $readOnly );
$field = UI_HTML_Elements::FieldCell( '', $radio );
$label = UI_HTML_Elements::LabelCell( '', $label, $class );
... | php | public static function RadioLabel( $name, $label, $value, $checked = NULL, $class = NULL, $readOnly = NULL )
{
$radio = UI_HTML_Elements::Radio( $name, $value, $checked, $class, $readOnly );
$field = UI_HTML_Elements::FieldCell( '', $radio );
$label = UI_HTML_Elements::LabelCell( '', $label, $class );
... | [
"public",
"static",
"function",
"RadioLabel",
"(",
"$",
"name",
",",
"$",
"label",
",",
"$",
"value",
",",
"$",
"checked",
"=",
"NULL",
",",
"$",
"class",
"=",
"NULL",
",",
"$",
"readOnly",
"=",
"NULL",
")",
"{",
"$",
"radio",
"=",
"UI_HTML_Elements"... | Builds HTML Code for a Radio Button with a Label.
@access public
@static
@param string $name Field Name
@param string $label Field Label
@param string $value Field Value
@param string $checked Auswahl-Status
@param string $class CSS Class
@param mixed $readOnly Field is not writable, JavaScript ... | [
"Builds",
"HTML",
"Code",
"for",
"a",
"Radio",
"Button",
"with",
"a",
"Label",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/HTML/Elements.php#L106-L114 |
36,243 | CeusMedia/Common | src/UI/HTML/Elements.php | UI_HTML_Elements.Acronym | public static function Acronym( $text, $description, $class = "" )
{
$ins_title = " title=\"".$description."\"";
$ins_class = $class ? " class=\"".$class."\"" : "";
$code = "<acronym".$ins_title.$ins_class.">".$text."</acronym>";
return $code;
} | php | public static function Acronym( $text, $description, $class = "" )
{
$ins_title = " title=\"".$description."\"";
$ins_class = $class ? " class=\"".$class."\"" : "";
$code = "<acronym".$ins_title.$ins_class.">".$text."</acronym>";
return $code;
} | [
"public",
"static",
"function",
"Acronym",
"(",
"$",
"text",
",",
"$",
"description",
",",
"$",
"class",
"=",
"\"\"",
")",
"{",
"$",
"ins_title",
"=",
"\" title=\\\"\"",
".",
"$",
"description",
".",
"\"\\\"\"",
";",
"$",
"ins_class",
"=",
"$",
"class",
... | Erzeugt HTML-Code eines Acronyms.
@access public
@static
@param string $text Text des Acronyms
@param string $description Beschreibung des Acronyms
@param string $class CSS-Klasse des Acronyms
@return string | [
"Erzeugt",
"HTML",
"-",
"Code",
"eines",
"Acronyms",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/HTML/Elements.php#L245-L251 |
36,244 | CeusMedia/Common | src/UI/HTML/Elements.php | UI_HTML_Elements.Field | public static function Field( $field_id, $field_element, $class = "field", $suffix = "", $colspan = 1 )
{
$ins_id = $field_id ? " id=\"fld_".$field_id."\"" : "";
$ins_class = $class ? " class=\"".$class."\"" : "";
$ins_colspan = ( $colspan > 1 ) ? " colspan=\"".$colspan."\"" : "";
if( $suffix )
{
... | php | public static function Field( $field_id, $field_element, $class = "field", $suffix = "", $colspan = 1 )
{
$ins_id = $field_id ? " id=\"fld_".$field_id."\"" : "";
$ins_class = $class ? " class=\"".$class."\"" : "";
$ins_colspan = ( $colspan > 1 ) ? " colspan=\"".$colspan."\"" : "";
if( $suffix )
{
... | [
"public",
"static",
"function",
"Field",
"(",
"$",
"field_id",
",",
"$",
"field_element",
",",
"$",
"class",
"=",
"\"field\"",
",",
"$",
"suffix",
"=",
"\"\"",
",",
"$",
"colspan",
"=",
"1",
")",
"{",
"$",
"ins_id",
"=",
"$",
"field_id",
"?",
"\" id=... | Erzeugt HTML-Code eines Eingabefeldes.
@access public
@static
@param string $field_id interner Name des Eingabefeldes
@param string $field_element HTML-Code des Eingabeelements
@param string $class CSS-Klasse
@param string $suffix Textausgabe hinter dem Eingabefeld
@param string $colspan Anzahl der ... | [
"Erzeugt",
"HTML",
"-",
"Code",
"eines",
"Eingabefeldes",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/HTML/Elements.php#L289-L302 |
36,245 | CeusMedia/Common | src/UI/HTML/Elements.php | UI_HTML_Elements.Image | public static function Image( $url, $title, $class = "", $width = NULL, $height = NULL )
{
$attributes = array(
'src' => $url,
'class' => $class ? $class : NULL,
'width' => $width ? $width : NULL,
'height' => $height ? $height : NULL,
'alt' => $title ? $title : NULL,
'title' => $ti... | php | public static function Image( $url, $title, $class = "", $width = NULL, $height = NULL )
{
$attributes = array(
'src' => $url,
'class' => $class ? $class : NULL,
'width' => $width ? $width : NULL,
'height' => $height ? $height : NULL,
'alt' => $title ? $title : NULL,
'title' => $ti... | [
"public",
"static",
"function",
"Image",
"(",
"$",
"url",
",",
"$",
"title",
",",
"$",
"class",
"=",
"\"\"",
",",
"$",
"width",
"=",
"NULL",
",",
"$",
"height",
"=",
"NULL",
")",
"{",
"$",
"attributes",
"=",
"array",
"(",
"'src'",
"=>",
"$",
"url... | Erzeugt HTML-Code einer Grafik.
@access public
@static
@param string $url URL der Grafik
@param string $title Alternativ-Text
@param string $class CSS-Klasse des Eingabefeldes
@return string | [
"Erzeugt",
"HTML",
"-",
"Code",
"einer",
"Grafik",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/HTML/Elements.php#L318-L332 |
36,246 | CeusMedia/Common | src/UI/HTML/Elements.php | UI_HTML_Elements.Label | public static function Label( $label_name, $label_text, $class = 'label', $icons = array() )
{
if( !is_array( $icons ) )
{
if( $icons )
$icons = array( $icons );
else
$icons = array();
}
if( sizeof( $icons ) && $label_name )
{
$ins_icons = "";
foreach( $icons as $icon )
i... | php | public static function Label( $label_name, $label_text, $class = 'label', $icons = array() )
{
if( !is_array( $icons ) )
{
if( $icons )
$icons = array( $icons );
else
$icons = array();
}
if( sizeof( $icons ) && $label_name )
{
$ins_icons = "";
foreach( $icons as $icon )
i... | [
"public",
"static",
"function",
"Label",
"(",
"$",
"label_name",
",",
"$",
"label_text",
",",
"$",
"class",
"=",
"'label'",
",",
"$",
"icons",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"icons",
")",
")",
"{",
"if",
"... | Erzeugt HTML-Code einer Feldbeschriftung.
@access public
@static
@param string $label_name interner Name des Beschrifungsfeldes
@param string $label_name Inhalt des Beschriftungsfeldes
@param string $class CSS-Klasse
@param string $icons Array mit Icons vor den Eingabefeld
@param string $width Weiten... | [
"Erzeugt",
"HTML",
"-",
"Code",
"einer",
"Feldbeschriftung",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/HTML/Elements.php#L345-L377 |
36,247 | CeusMedia/Common | src/UI/HTML/Elements.php | UI_HTML_Elements.Link | public static function Link( $url, $name, $class = NULL, $target = NULL, $confirm = NULL, $tabindex = NULL, $key = NULL, $relation = NULL )
{
$url = str_replace( '"', "'", $url );
$url = str_replace( "&", "&", $url );
$attributes = array(
'href' => $url,
'class' => $class ? $class : NULL,
... | php | public static function Link( $url, $name, $class = NULL, $target = NULL, $confirm = NULL, $tabindex = NULL, $key = NULL, $relation = NULL )
{
$url = str_replace( '"', "'", $url );
$url = str_replace( "&", "&", $url );
$attributes = array(
'href' => $url,
'class' => $class ? $class : NULL,
... | [
"public",
"static",
"function",
"Link",
"(",
"$",
"url",
",",
"$",
"name",
",",
"$",
"class",
"=",
"NULL",
",",
"$",
"target",
"=",
"NULL",
",",
"$",
"confirm",
"=",
"NULL",
",",
"$",
"tabindex",
"=",
"NULL",
",",
"$",
"key",
"=",
"NULL",
",",
... | Erzeugt HTML-Code eines Links.
@access public
@static
@param string $url URL des Links
@param string $name Name des Links
@param string $class CSS-Klasse des Links
@param string $target Zielframe des Links
@param string $confirm Bestätigungstext des Links
@param int $tabindex Tabulatur-Index
@pa... | [
"Erzeugt",
"HTML",
"-",
"Code",
"eines",
"Links",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/HTML/Elements.php#L393-L408 |
36,248 | CeusMedia/Common | src/UI/HTML/Elements.php | UI_HTML_Elements.ListItem | public static function ListItem( $content, $level = 0, $attributes = array() )
{
$depth = 2 * abs( (int) $level ) + 1;
$indent = str_repeat( " ", $depth );
$tag = UI_HTML_Tag::create( "li", $content, $attributes );
$code = $indent.$tag;
return $code;
} | php | public static function ListItem( $content, $level = 0, $attributes = array() )
{
$depth = 2 * abs( (int) $level ) + 1;
$indent = str_repeat( " ", $depth );
$tag = UI_HTML_Tag::create( "li", $content, $attributes );
$code = $indent.$tag;
return $code;
} | [
"public",
"static",
"function",
"ListItem",
"(",
"$",
"content",
",",
"$",
"level",
"=",
"0",
",",
"$",
"attributes",
"=",
"array",
"(",
")",
")",
"{",
"$",
"depth",
"=",
"2",
"*",
"abs",
"(",
"(",
"int",
")",
"$",
"level",
")",
"+",
"1",
";",
... | Build List Item.
@access public
@static
@param string $content Content of List Item
@param int $level Level of Indenting
@param array $attributes Array of HTML Attributes
@return string | [
"Build",
"List",
"Item",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/HTML/Elements.php#L419-L426 |
36,249 | CeusMedia/Common | src/UI/HTML/Elements.php | UI_HTML_Elements.orderedList | public static function orderedList( $items, $level = 0, $attributes = array() )
{
$content = "\n".implode( "\n", $items )."\n";
$indent = str_repeat( " ", 2 * abs( (int) $level ) );
$tag = UI_HTML_Tag::create( "ol", $content, $attributes );
$code = $indent.$tag;
return $code;
} | php | public static function orderedList( $items, $level = 0, $attributes = array() )
{
$content = "\n".implode( "\n", $items )."\n";
$indent = str_repeat( " ", 2 * abs( (int) $level ) );
$tag = UI_HTML_Tag::create( "ol", $content, $attributes );
$code = $indent.$tag;
return $code;
} | [
"public",
"static",
"function",
"orderedList",
"(",
"$",
"items",
",",
"$",
"level",
"=",
"0",
",",
"$",
"attributes",
"=",
"array",
"(",
")",
")",
"{",
"$",
"content",
"=",
"\"\\n\"",
".",
"implode",
"(",
"\"\\n\"",
",",
"$",
"items",
")",
".",
"\... | Build ordered List from List Items.
@access public
@static
@param string $content Content of List Item
@param int $level Level of Indenting
@param array $attributes Array of HTML Attributes
@return string | [
"Build",
"ordered",
"List",
"from",
"List",
"Items",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/HTML/Elements.php#L437-L444 |
36,250 | CeusMedia/Common | src/UI/HTML/Elements.php | UI_HTML_Elements.Separator | public static function Separator( $colspan = 3, $rowspan = 1, $class = "inline" )
{
$ins_class = $class ? " class=\"".$class."\"" : "";
$ins_colspan = $colspan ? " colspan=\"".$colspan."\"" : "";
$ins_rowspan = $rowspan ? " rowspan=\"".$rowspan."\"" : "";
$code = "<tr><td".$ins_colspan.$ins_rowspan.$ins_c... | php | public static function Separator( $colspan = 3, $rowspan = 1, $class = "inline" )
{
$ins_class = $class ? " class=\"".$class."\"" : "";
$ins_colspan = $colspan ? " colspan=\"".$colspan."\"" : "";
$ins_rowspan = $rowspan ? " rowspan=\"".$rowspan."\"" : "";
$code = "<tr><td".$ins_colspan.$ins_rowspan.$ins_c... | [
"public",
"static",
"function",
"Separator",
"(",
"$",
"colspan",
"=",
"3",
",",
"$",
"rowspan",
"=",
"1",
",",
"$",
"class",
"=",
"\"inline\"",
")",
"{",
"$",
"ins_class",
"=",
"$",
"class",
"?",
"\" class=\\\"\"",
".",
"$",
"class",
".",
"\"\\\"\"",
... | Erzeugt HTML-Code einer horizontale und vertikale Trennzeile.
@access public
@static
@param int $colspan Name des Formulars
@param int $rowspan URL der Aktion
@param int $strength Stärke der Linie
@param string $class CSS-Klasse
@return string | [
"Erzeugt",
"HTML",
"-",
"Code",
"einer",
"horizontale",
"und",
"vertikale",
"Trennzeile",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/HTML/Elements.php#L473-L480 |
36,251 | CeusMedia/Common | src/UI/HTML/Elements.php | UI_HTML_Elements.Table | public static function Table( $content, $class = "filledframe", $width = "100%", $border = 0, $padding = 0, $spacing = 0 )
{
$ins_class = $class ? " class=\"".$class."\"" : "";
$ins_width = $width ? " width=\"".$width."\"" : "";
$ins_border = $border ? " border=\"".$border."\"" : "";
$ins_padding = " cell... | php | public static function Table( $content, $class = "filledframe", $width = "100%", $border = 0, $padding = 0, $spacing = 0 )
{
$ins_class = $class ? " class=\"".$class."\"" : "";
$ins_width = $width ? " width=\"".$width."\"" : "";
$ins_border = $border ? " border=\"".$border."\"" : "";
$ins_padding = " cell... | [
"public",
"static",
"function",
"Table",
"(",
"$",
"content",
",",
"$",
"class",
"=",
"\"filledframe\"",
",",
"$",
"width",
"=",
"\"100%\"",
",",
"$",
"border",
"=",
"0",
",",
"$",
"padding",
"=",
"0",
",",
"$",
"spacing",
"=",
"0",
")",
"{",
"$",
... | Erzeugt HTML-Code einer Tabelle.
@access public
@static
@param string $content Inhalt der Tabelle
@param string $class CSS Style Klasse
@param int $width Breite der Tabelle
@param int $border Rahmendicke der Tabelle
@param int $padding Innenabstand der Tabelle
@param int $spacing Zellenabs... | [
"Erzeugt",
"HTML",
"-",
"Code",
"einer",
"Tabelle",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/HTML/Elements.php#L494-L503 |
36,252 | CeusMedia/Common | src/UI/HTML/Elements.php | UI_HTML_Elements.unorderedList | public static function unorderedList( $items, $level = 0, $attributes = array() )
{
$depth1 = 2 * abs( (int) $level );
$depth2 = $level ? 2 * abs( (int) $level - 1 ) + 1 : 0;
$indent1 = str_repeat( " ", $depth1 );
$indent2 = str_repeat( " ", $depth2 );
$content = "\n".implode( "\n", $items )."\n".$... | php | public static function unorderedList( $items, $level = 0, $attributes = array() )
{
$depth1 = 2 * abs( (int) $level );
$depth2 = $level ? 2 * abs( (int) $level - 1 ) + 1 : 0;
$indent1 = str_repeat( " ", $depth1 );
$indent2 = str_repeat( " ", $depth2 );
$content = "\n".implode( "\n", $items )."\n".$... | [
"public",
"static",
"function",
"unorderedList",
"(",
"$",
"items",
",",
"$",
"level",
"=",
"0",
",",
"$",
"attributes",
"=",
"array",
"(",
")",
")",
"{",
"$",
"depth1",
"=",
"2",
"*",
"abs",
"(",
"(",
"int",
")",
"$",
"level",
")",
";",
"$",
"... | Build unordered List from List Items.
@access public
@static
@param string $content Content of List Item
@param int $level Level of Indenting
@param array $attributes Array of HTML Attributes
@return string | [
"Build",
"unordered",
"List",
"from",
"List",
"Items",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/HTML/Elements.php#L572-L582 |
36,253 | CeusMedia/Common | src/XML/Parser.php | XML_Parser.handleTagOpenForArray | protected function handleTagOpenForArray( $parser, $tag, $attributes )
{
$count = count( $this->last ) - 1;
$this->last[$count][] = array(
"tag" => $tag,
"attributes" => $attributes,
"content" => '',
"children" => array()
);
$index = count( $this->last[$count] ) - 1;
$this->last[] =... | php | protected function handleTagOpenForArray( $parser, $tag, $attributes )
{
$count = count( $this->last ) - 1;
$this->last[$count][] = array(
"tag" => $tag,
"attributes" => $attributes,
"content" => '',
"children" => array()
);
$index = count( $this->last[$count] ) - 1;
$this->last[] =... | [
"protected",
"function",
"handleTagOpenForArray",
"(",
"$",
"parser",
",",
"$",
"tag",
",",
"$",
"attributes",
")",
"{",
"$",
"count",
"=",
"count",
"(",
"$",
"this",
"->",
"last",
")",
"-",
"1",
";",
"$",
"this",
"->",
"last",
"[",
"$",
"count",
"... | Callback Method for opening Tags on Array Collection.
@access protected
@param resource $parser Resource of XML Parser
@param string $tag Name of parsed Tag
@param array $attributes Array of parsed Attributes
@return void | [
"Callback",
"Method",
"for",
"opening",
"Tags",
"on",
"Array",
"Collection",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/XML/Parser.php#L119-L130 |
36,254 | CeusMedia/Common | src/XML/Parser.php | XML_Parser.handleTagOpenForObject | protected function handleTagOpenForObject( $parser, $tag, $attributes )
{
$count = count( $this->last ) - 1;
$parentNode =& $this->last[$count];
$childNode = new XML_DOM_Node(
$tag,
"",
$attributes
);
$parentNode->addChild( $childNode );
$this->last[] =& $childNode;
} | php | protected function handleTagOpenForObject( $parser, $tag, $attributes )
{
$count = count( $this->last ) - 1;
$parentNode =& $this->last[$count];
$childNode = new XML_DOM_Node(
$tag,
"",
$attributes
);
$parentNode->addChild( $childNode );
$this->last[] =& $childNode;
} | [
"protected",
"function",
"handleTagOpenForObject",
"(",
"$",
"parser",
",",
"$",
"tag",
",",
"$",
"attributes",
")",
"{",
"$",
"count",
"=",
"count",
"(",
"$",
"this",
"->",
"last",
")",
"-",
"1",
";",
"$",
"parentNode",
"=",
"&",
"$",
"this",
"->",
... | Callback Method for opening Tags on Object Collection.
@access protected
@param resource $parser Resource of XML Parser
@param string $tag Name of parsed Tag
@param array $attributes Array of parsed Attributes
@return void | [
"Callback",
"Method",
"for",
"opening",
"Tags",
"on",
"Object",
"Collection",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/XML/Parser.php#L140-L151 |
36,255 | CeusMedia/Common | src/XML/Parser.php | XML_Parser.toArray | public function toArray( $xml )
{
$this->data = array();
$this->xml = xml_parser_create();
xml_set_object( $this->xml, $this );
xml_set_element_handler( $this->xml, 'handleTagOpenForArray', 'handleTagCloseForArray' );
xml_set_character_data_handler( $this->xml, 'handleCDataForArray' );
$this->last =... | php | public function toArray( $xml )
{
$this->data = array();
$this->xml = xml_parser_create();
xml_set_object( $this->xml, $this );
xml_set_element_handler( $this->xml, 'handleTagOpenForArray', 'handleTagCloseForArray' );
xml_set_character_data_handler( $this->xml, 'handleCDataForArray' );
$this->last =... | [
"public",
"function",
"toArray",
"(",
"$",
"xml",
")",
"{",
"$",
"this",
"->",
"data",
"=",
"array",
"(",
")",
";",
"$",
"this",
"->",
"xml",
"=",
"xml_parser_create",
"(",
")",
";",
"xml_set_object",
"(",
"$",
"this",
"->",
"xml",
",",
"$",
"this"... | Returns an Array Structure from XML String.
@access public
@return array | [
"Returns",
"an",
"Array",
"Structure",
"from",
"XML",
"String",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/XML/Parser.php#L158-L175 |
36,256 | ncou/Chiron | src/Chiron/Http/Session/Session.php | Session.resumeSession | private function resumeSession(): bool
{
if ($this->manager->isStarted() || $this->manager->resume()) {
return true;
}
return false;
} | php | private function resumeSession(): bool
{
if ($this->manager->isStarted() || $this->manager->resume()) {
return true;
}
return false;
} | [
"private",
"function",
"resumeSession",
"(",
")",
":",
"bool",
"{",
"if",
"(",
"$",
"this",
"->",
"manager",
"->",
"isStarted",
"(",
")",
"||",
"$",
"this",
"->",
"manager",
"->",
"resume",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
... | If the session has already been started, or if a session is available, we try to resumes it.
@return bool | [
"If",
"the",
"session",
"has",
"already",
"been",
"started",
"or",
"if",
"a",
"session",
"is",
"available",
"we",
"try",
"to",
"resumes",
"it",
"."
] | bfb6f85faba0e54005896b09a7c34e456d1a1bed | https://github.com/ncou/Chiron/blob/bfb6f85faba0e54005896b09a7c34e456d1a1bed/src/Chiron/Http/Session/Session.php#L93-L100 |
36,257 | CeusMedia/Common | src/FS/File/PHP/Parser/Regular.php | FS_File_PHP_Parser_Regular.parseClassOrInterface | protected function parseClassOrInterface( ADT_PHP_File $parent, $matches )
{
switch( strtolower( trim( $matches[3] ) ) )
{
case 'interface':
$artefact = new ADT_PHP_Interface( $matches[4] );
if( isset( $matches[5] ) )
$artefact->setExtendedInterfaceName( $matches[6] );
$artefact->setFinal( (boo... | php | protected function parseClassOrInterface( ADT_PHP_File $parent, $matches )
{
switch( strtolower( trim( $matches[3] ) ) )
{
case 'interface':
$artefact = new ADT_PHP_Interface( $matches[4] );
if( isset( $matches[5] ) )
$artefact->setExtendedInterfaceName( $matches[6] );
$artefact->setFinal( (boo... | [
"protected",
"function",
"parseClassOrInterface",
"(",
"ADT_PHP_File",
"$",
"parent",
",",
"$",
"matches",
")",
"{",
"switch",
"(",
"strtolower",
"(",
"trim",
"(",
"$",
"matches",
"[",
"3",
"]",
")",
")",
")",
"{",
"case",
"'interface'",
":",
"$",
"artef... | Parses a Class Signature and returns collected Information.
@access protected
@param ADT_PHP_File $parent File Object of current Class
@param array $matches Matches of RegEx
@return ADT_PHP_Interface|ADT_PHP_Class | [
"Parses",
"a",
"Class",
"Signature",
"and",
"returns",
"collected",
"Information",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/FS/File/PHP/Parser/Regular.php#L190-L225 |
36,258 | CeusMedia/Common | src/FS/File/PHP/Parser/Regular.php | FS_File_PHP_Parser_Regular.parseFunction | protected function parseFunction( ADT_PHP_File $parent, $matches )
{
$function = new ADT_PHP_Function( $matches[6] );
$function->setParent( $parent );
$function->setLine( $this->lineNumber );
if( trim( $matches[7] ) )
{
$paramList = array();
foreach( explode( ",", $matches[7] ) as $param )
{
$p... | php | protected function parseFunction( ADT_PHP_File $parent, $matches )
{
$function = new ADT_PHP_Function( $matches[6] );
$function->setParent( $parent );
$function->setLine( $this->lineNumber );
if( trim( $matches[7] ) )
{
$paramList = array();
foreach( explode( ",", $matches[7] ) as $param )
{
$p... | [
"protected",
"function",
"parseFunction",
"(",
"ADT_PHP_File",
"$",
"parent",
",",
"$",
"matches",
")",
"{",
"$",
"function",
"=",
"new",
"ADT_PHP_Function",
"(",
"$",
"matches",
"[",
"6",
"]",
")",
";",
"$",
"function",
"->",
"setParent",
"(",
"$",
"par... | Parses a Function Signature and returns collected Information.
@access protected
@param ADT_PHP_File $parent Parent File Data Object
@param array $matches Matches of RegEx
@return ADT_PHP_Function | [
"Parses",
"a",
"Function",
"Signature",
"and",
"returns",
"collected",
"Information",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/FS/File/PHP/Parser/Regular.php#L569-L593 |
36,259 | CeusMedia/Common | src/FS/File/PHP/Parser/Regular.php | FS_File_PHP_Parser_Regular.parseMember | protected function parseMember( $parent, $matches, $docBlock = NULL )
{
$variable = new ADT_PHP_Member( $matches[4], NULL, NULL );
$variable->setParent( $parent );
$variable->setLine( $this->lineNumber );
if( isset( $matches[5] ) )
$variable->setDefault( preg_replace( "@;$@", "", $matches[6] ) );
if( !e... | php | protected function parseMember( $parent, $matches, $docBlock = NULL )
{
$variable = new ADT_PHP_Member( $matches[4], NULL, NULL );
$variable->setParent( $parent );
$variable->setLine( $this->lineNumber );
if( isset( $matches[5] ) )
$variable->setDefault( preg_replace( "@;$@", "", $matches[6] ) );
if( !e... | [
"protected",
"function",
"parseMember",
"(",
"$",
"parent",
",",
"$",
"matches",
",",
"$",
"docBlock",
"=",
"NULL",
")",
"{",
"$",
"variable",
"=",
"new",
"ADT_PHP_Member",
"(",
"$",
"matches",
"[",
"4",
"]",
",",
"NULL",
",",
"NULL",
")",
";",
"$",
... | Parses a Class Member Signature and returns collected Information.
@access protected
@param ADT_PHP_Class $parent Parent Class Data Object
@param array $matches Matches of RegEx
@param array $docBlock Variable data object from Doc Parser
@return ADT_PHP_Member | [
"Parses",
"a",
"Class",
"Member",
"Signature",
"and",
"returns",
"collected",
"Information",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/FS/File/PHP/Parser/Regular.php#L603-L619 |
36,260 | CeusMedia/Common | src/FS/File/PHP/Parser/Regular.php | FS_File_PHP_Parser_Regular.parseMethod | protected function parseMethod( ADT_PHP_Interface $parent, $matches )
{
$method = new ADT_PHP_Method( $matches[6] );
$method->setParent( $parent );
$method->setLine( $this->lineNumber );
if( !empty( $matches[4] ) )
$method->setAccess( trim( $matches[4] ) );
$method->setAbstract( (bool) $matches[1] );
$m... | php | protected function parseMethod( ADT_PHP_Interface $parent, $matches )
{
$method = new ADT_PHP_Method( $matches[6] );
$method->setParent( $parent );
$method->setLine( $this->lineNumber );
if( !empty( $matches[4] ) )
$method->setAccess( trim( $matches[4] ) );
$method->setAbstract( (bool) $matches[1] );
$m... | [
"protected",
"function",
"parseMethod",
"(",
"ADT_PHP_Interface",
"$",
"parent",
",",
"$",
"matches",
")",
"{",
"$",
"method",
"=",
"new",
"ADT_PHP_Method",
"(",
"$",
"matches",
"[",
"6",
"]",
")",
";",
"$",
"method",
"->",
"setParent",
"(",
"$",
"parent... | Parses a Method Signature and returns collected Information.
@access protected
@param ADT_PHP_Interface $parent Parent Class Data Object
@param array $matches Matches of RegEx
@return ADT_PHP_Method | [
"Parses",
"a",
"Method",
"Signature",
"and",
"returns",
"collected",
"Information",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/FS/File/PHP/Parser/Regular.php#L628-L663 |
36,261 | Assasz/yggdrasil | src/Yggdrasil/Core/Driver/DriverAccessorTrait.php | DriverAccessorTrait.getRouter | protected function getRouter(): RouterDriver
{
if (!$this->drivers->get('router') instanceof RouterDriver) {
throw new DriverNotSupportedException('Provided router driver is not supported.');
}
return $this->drivers->get('router');
} | php | protected function getRouter(): RouterDriver
{
if (!$this->drivers->get('router') instanceof RouterDriver) {
throw new DriverNotSupportedException('Provided router driver is not supported.');
}
return $this->drivers->get('router');
} | [
"protected",
"function",
"getRouter",
"(",
")",
":",
"RouterDriver",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"drivers",
"->",
"get",
"(",
"'router'",
")",
"instanceof",
"RouterDriver",
")",
"{",
"throw",
"new",
"DriverNotSupportedException",
"(",
"'Provided ro... | Returns router driver instance
@return RouterDriver
@throws DriverNotSupportedException | [
"Returns",
"router",
"driver",
"instance"
] | bee9bef7713b85799cdd3e9b23dccae33154f3b3 | https://github.com/Assasz/yggdrasil/blob/bee9bef7713b85799cdd3e9b23dccae33154f3b3/src/Yggdrasil/Core/Driver/DriverAccessorTrait.php#L55-L62 |
36,262 | Assasz/yggdrasil | src/Yggdrasil/Core/Driver/DriverAccessorTrait.php | DriverAccessorTrait.getTemplateEngine | protected function getTemplateEngine(): TemplateEngineDriver
{
if (!$this->drivers->get('templateEngine') instanceof TemplateEngineDriver) {
throw new DriverNotSupportedException('Provided template engine driver is not supported.');
}
return $this->drivers->get('templateEngine')... | php | protected function getTemplateEngine(): TemplateEngineDriver
{
if (!$this->drivers->get('templateEngine') instanceof TemplateEngineDriver) {
throw new DriverNotSupportedException('Provided template engine driver is not supported.');
}
return $this->drivers->get('templateEngine')... | [
"protected",
"function",
"getTemplateEngine",
"(",
")",
":",
"TemplateEngineDriver",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"drivers",
"->",
"get",
"(",
"'templateEngine'",
")",
"instanceof",
"TemplateEngineDriver",
")",
"{",
"throw",
"new",
"DriverNotSupportedEx... | Returns template engine driver instance
@return TemplateEngineDriver
@throws DriverNotSupportedException | [
"Returns",
"template",
"engine",
"driver",
"instance"
] | bee9bef7713b85799cdd3e9b23dccae33154f3b3 | https://github.com/Assasz/yggdrasil/blob/bee9bef7713b85799cdd3e9b23dccae33154f3b3/src/Yggdrasil/Core/Driver/DriverAccessorTrait.php#L70-L77 |
36,263 | CeusMedia/Common | src/ADT/List/LevelMap.php | ADT_List_LevelMap.has | public function has( $key )
{
if( empty( $key ) ) // no Key given
throw new InvalidArgumentException( 'Key must not be empty.' ); // throw Exception
if( isset( $this->pairs[$key] ) ) // Key is set on its own
return TRUE;
else // Key has not been fo... | php | public function has( $key )
{
if( empty( $key ) ) // no Key given
throw new InvalidArgumentException( 'Key must not be empty.' ); // throw Exception
if( isset( $this->pairs[$key] ) ) // Key is set on its own
return TRUE;
else // Key has not been fo... | [
"public",
"function",
"has",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"key",
")",
")",
"// no Key given",
"throw",
"new",
"InvalidArgumentException",
"(",
"'Key must not be empty.'",
")",
";",
"// throw Exception",
"if",
"(",
"isset",
"(",
... | Indicates whether a Key or Key Prefix is existing.
@access public
@param string $key Key in Dictionary
@return bool | [
"Indicates",
"whether",
"a",
"Key",
"or",
"Key",
"Prefix",
"is",
"existing",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/ADT/List/LevelMap.php#L115-L133 |
36,264 | CeusMedia/Common | src/ADT/List/LevelMap.php | ADT_List_LevelMap.remove | public function remove( $key )
{
if( empty( $key ) ) // no Key given
throw new InvalidArgumentException( 'Key must not be empty.' ); // throw Exception
if( isset( $this->pairs[$key] ) ) // Key is set on its own
unset( $this->pairs[$key] ); // remove Pair
... | php | public function remove( $key )
{
if( empty( $key ) ) // no Key given
throw new InvalidArgumentException( 'Key must not be empty.' ); // throw Exception
if( isset( $this->pairs[$key] ) ) // Key is set on its own
unset( $this->pairs[$key] ); // remove Pair
... | [
"public",
"function",
"remove",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"key",
")",
")",
"// no Key given",
"throw",
"new",
"InvalidArgumentException",
"(",
"'Key must not be empty.'",
")",
";",
"// throw Exception",
"if",
"(",
"isset",
"(",... | Removes a Value or Pair Map from Dictionary by its Key.
@access public
@param string $key Key in Dictionary
@return void | [
"Removes",
"a",
"Value",
"or",
"Pair",
"Map",
"from",
"Dictionary",
"by",
"its",
"Key",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/ADT/List/LevelMap.php#L141-L158 |
36,265 | CeusMedia/Common | src/XML/Atom/Validator.php | XML_Atom_Validator.getErrors | public static function getErrors()
{
$list = array();
foreach( $this->errors as $errorKey )
$list[$errorKey] = self::$rules[$errorKey];
return $list;
} | php | public static function getErrors()
{
$list = array();
foreach( $this->errors as $errorKey )
$list[$errorKey] = self::$rules[$errorKey];
return $list;
} | [
"public",
"static",
"function",
"getErrors",
"(",
")",
"{",
"$",
"list",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"errors",
"as",
"$",
"errorKey",
")",
"$",
"list",
"[",
"$",
"errorKey",
"]",
"=",
"self",
"::",
"$",
"rules",
... | Returns Error Messages of all Atom Rules hurt by Validation.
Call Method 'validate'.
@access public
@static
@return array | [
"Returns",
"Error",
"Messages",
"of",
"all",
"Atom",
"Rules",
"hurt",
"by",
"Validation",
".",
"Call",
"Method",
"validate",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/XML/Atom/Validator.php#L79-L85 |
36,266 | CeusMedia/Common | src/XML/Atom/Validator.php | XML_Atom_Validator.getFirstError | public function getFirstError()
{
if( !$this->errors )
return "";
$error = array_pop( array_slice( $this->errors, 0, 1 ) );
return $this->rules[$error];
} | php | public function getFirstError()
{
if( !$this->errors )
return "";
$error = array_pop( array_slice( $this->errors, 0, 1 ) );
return $this->rules[$error];
} | [
"public",
"function",
"getFirstError",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"errors",
")",
"return",
"\"\"",
";",
"$",
"error",
"=",
"array_pop",
"(",
"array_slice",
"(",
"$",
"this",
"->",
"errors",
",",
"0",
",",
"1",
")",
")",
";",
... | Returns first Error Message from Validation.
@access public
@return string | [
"Returns",
"first",
"Error",
"Message",
"from",
"Validation",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/XML/Atom/Validator.php#L92-L98 |
36,267 | CeusMedia/Common | src/Net/API/Dyn.php | Net_API_Dyn.getIp | public function getIp(){
if( (int) $this->lastCheck > 0 && time() - $this->lastCheck < 10 * 60 )
return $this->lastIp;
$this->reader->setUrl( 'http://checkip.dyndns.org' );
$html = $this->reader->read();
$parts = explode( ": ", strip_tags( $html ) );
$ip = trim( array_pop( $parts ) );
$this->save( array... | php | public function getIp(){
if( (int) $this->lastCheck > 0 && time() - $this->lastCheck < 10 * 60 )
return $this->lastIp;
$this->reader->setUrl( 'http://checkip.dyndns.org' );
$html = $this->reader->read();
$parts = explode( ": ", strip_tags( $html ) );
$ip = trim( array_pop( $parts ) );
$this->save( array... | [
"public",
"function",
"getIp",
"(",
")",
"{",
"if",
"(",
"(",
"int",
")",
"$",
"this",
"->",
"lastCheck",
">",
"0",
"&&",
"time",
"(",
")",
"-",
"$",
"this",
"->",
"lastCheck",
"<",
"10",
"*",
"60",
")",
"return",
"$",
"this",
"->",
"lastIp",
"... | Returns external IP of this server identified by Dyn service.
@access public
@return string IP address to be identified | [
"Returns",
"external",
"IP",
"of",
"this",
"server",
"identified",
"by",
"Dyn",
"service",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/API/Dyn.php#L73-L82 |
36,268 | CeusMedia/Common | src/Net/API/Dyn.php | Net_API_Dyn.save | protected function save( $data ){
if( !$this->cacheFile )
return;
$last = array(
'ip' => $this->lastIp,
'timestamp' => $this->lastCheck
);
$data = array_merge( $last, $data );
return FS_File_Writer::save( $this->cacheFile, json_encode( $data ) );
} | php | protected function save( $data ){
if( !$this->cacheFile )
return;
$last = array(
'ip' => $this->lastIp,
'timestamp' => $this->lastCheck
);
$data = array_merge( $last, $data );
return FS_File_Writer::save( $this->cacheFile, json_encode( $data ) );
} | [
"protected",
"function",
"save",
"(",
"$",
"data",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"cacheFile",
")",
"return",
";",
"$",
"last",
"=",
"array",
"(",
"'ip'",
"=>",
"$",
"this",
"->",
"lastIp",
",",
"'timestamp'",
"=>",
"$",
"this",
"->",... | Save cache.
@access protected
@param array $data Map of IP and timestamp
@return integer Number of bytes written to cache file | [
"Save",
"cache",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/API/Dyn.php#L90-L99 |
36,269 | CeusMedia/Common | src/Net/API/Dyn.php | Net_API_Dyn.update | public function update( $username, $password, $host, $ip ){
if( (int) $this->lastCheck > 0 && time() - $this->lastCheck < 10 * 60 )
return "noop";
$url = "http://%s:%s@members.dyndns.org/nic/update?hostname=%s&myip=%s&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG";
$url = sprintf( $url, $username, $password, $host, $ip... | php | public function update( $username, $password, $host, $ip ){
if( (int) $this->lastCheck > 0 && time() - $this->lastCheck < 10 * 60 )
return "noop";
$url = "http://%s:%s@members.dyndns.org/nic/update?hostname=%s&myip=%s&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG";
$url = sprintf( $url, $username, $password, $host, $ip... | [
"public",
"function",
"update",
"(",
"$",
"username",
",",
"$",
"password",
",",
"$",
"host",
",",
"$",
"ip",
")",
"{",
"if",
"(",
"(",
"int",
")",
"$",
"this",
"->",
"lastCheck",
">",
"0",
"&&",
"time",
"(",
")",
"-",
"$",
"this",
"->",
"lastC... | Updates IP of host registered by Dyn.
@access public
@param string $username Dyn user name
@param string $password Dyn user password
@param string $host Dyn registered host
@param string $ip Ip address to set for host
@return string Update code string returned by Dyn service | [
"Updates",
"IP",
"of",
"host",
"registered",
"by",
"Dyn",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Net/API/Dyn.php#L110-L118 |
36,270 | CeusMedia/Common | src/FS/File/Configuration/Reader.php | FS_File_Configuration_Reader.loadIniFile | protected function loadIniFile( $fileName )
{
if( self::$iniQuickLoad )
{
$array = parse_ini_file( $fileName, TRUE );
foreach( $array as $sectionName => $sectionData )
foreach( $sectionData as $key => $value )
$this->pairs[$sectionName.".".$key] = $value;
}
else
{
$pattern = '@^(string|inte... | php | protected function loadIniFile( $fileName )
{
if( self::$iniQuickLoad )
{
$array = parse_ini_file( $fileName, TRUE );
foreach( $array as $sectionName => $sectionData )
foreach( $sectionData as $key => $value )
$this->pairs[$sectionName.".".$key] = $value;
}
else
{
$pattern = '@^(string|inte... | [
"protected",
"function",
"loadIniFile",
"(",
"$",
"fileName",
")",
"{",
"if",
"(",
"self",
"::",
"$",
"iniQuickLoad",
")",
"{",
"$",
"array",
"=",
"parse_ini_file",
"(",
"$",
"fileName",
",",
"TRUE",
")",
";",
"foreach",
"(",
"$",
"array",
"as",
"$",
... | Loads Configuration from INI File.
@access protected
@param string $fileName File Name of Configuration File
@return void | [
"Loads",
"Configuration",
"from",
"INI",
"File",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/FS/File/Configuration/Reader.php#L156-L187 |
36,271 | CeusMedia/Common | src/FS/File/Configuration/Reader.php | FS_File_Configuration_Reader.loadJsonFile | protected function loadJsonFile( $fileName )
{
$json = FS_File_Reader::load( $fileName );
$array = ADT_JSON_Converter::convertToArray( $json );
foreach( $array as $sectionName => $sectionData )
foreach( $sectionData as $key => $item )
$this->pairs[$sectionName.".".$key] = $item['value'];
} | php | protected function loadJsonFile( $fileName )
{
$json = FS_File_Reader::load( $fileName );
$array = ADT_JSON_Converter::convertToArray( $json );
foreach( $array as $sectionName => $sectionData )
foreach( $sectionData as $key => $item )
$this->pairs[$sectionName.".".$key] = $item['value'];
} | [
"protected",
"function",
"loadJsonFile",
"(",
"$",
"fileName",
")",
"{",
"$",
"json",
"=",
"FS_File_Reader",
"::",
"load",
"(",
"$",
"fileName",
")",
";",
"$",
"array",
"=",
"ADT_JSON_Converter",
"::",
"convertToArray",
"(",
"$",
"json",
")",
";",
"foreach... | Loads Configuration from JSON File.
@access protected
@param string $fileName File Name of Configuration File
@return void | [
"Loads",
"Configuration",
"from",
"JSON",
"File",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/FS/File/Configuration/Reader.php#L195-L202 |
36,272 | CeusMedia/Common | src/FS/File/Configuration/Reader.php | FS_File_Configuration_Reader.loadWddxFile | protected function loadWddxFile( $fileName )
{
$array = XML_WDDX_FileReader::load( $fileName );
foreach( $array as $sectionName => $sectionData )
foreach( $sectionData as $key => $value )
$this->pairs[$sectionName.".".$key] = $value;
} | php | protected function loadWddxFile( $fileName )
{
$array = XML_WDDX_FileReader::load( $fileName );
foreach( $array as $sectionName => $sectionData )
foreach( $sectionData as $key => $value )
$this->pairs[$sectionName.".".$key] = $value;
} | [
"protected",
"function",
"loadWddxFile",
"(",
"$",
"fileName",
")",
"{",
"$",
"array",
"=",
"XML_WDDX_FileReader",
"::",
"load",
"(",
"$",
"fileName",
")",
";",
"foreach",
"(",
"$",
"array",
"as",
"$",
"sectionName",
"=>",
"$",
"sectionData",
")",
"foreach... | Loads Configuration from WDDX File.
@access protected
@param string $fileName File Name of Configuration File
@return void | [
"Loads",
"Configuration",
"from",
"WDDX",
"File",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/FS/File/Configuration/Reader.php#L210-L216 |
36,273 | CeusMedia/Common | src/FS/File/Configuration/Reader.php | FS_File_Configuration_Reader.loadXmlFile | protected function loadXmlFile( $fileName )
{
$root = XML_ElementReader::readFile( $fileName ); // get root element of XML file
$this->pairs = array();
foreach( $root as $sectionNode ) // iterate sections
{
$sectionName = $sectionNode->getAttribute( 'name' ); // get sectio... | php | protected function loadXmlFile( $fileName )
{
$root = XML_ElementReader::readFile( $fileName ); // get root element of XML file
$this->pairs = array();
foreach( $root as $sectionNode ) // iterate sections
{
$sectionName = $sectionNode->getAttribute( 'name' ); // get sectio... | [
"protected",
"function",
"loadXmlFile",
"(",
"$",
"fileName",
")",
"{",
"$",
"root",
"=",
"XML_ElementReader",
"::",
"readFile",
"(",
"$",
"fileName",
")",
";",
"// get root element of XML file",
"$",
"this",
"->",
"pairs",
"=",
"array",
"(",
")",
";",
"for... | Loads Configuration from XML File.
@access protected
@param string $fileName File Name of Configuration File
@return void | [
"Loads",
"Configuration",
"from",
"XML",
"File",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/FS/File/Configuration/Reader.php#L224-L234 |
36,274 | CeusMedia/Common | src/FS/File/Configuration/Reader.php | FS_File_Configuration_Reader.loadXmlSection | protected function loadXmlSection( $node, $path = NULL )
{
$path .= $path ? '.' : ''; // extend path by delimiter
foreach( $node as $child ) // iterate node children
{
$name = $child->getAttribute( 'name' ); // get node name of child
switch( $child->getName() ){... | php | protected function loadXmlSection( $node, $path = NULL )
{
$path .= $path ? '.' : ''; // extend path by delimiter
foreach( $node as $child ) // iterate node children
{
$name = $child->getAttribute( 'name' ); // get node name of child
switch( $child->getName() ){... | [
"protected",
"function",
"loadXmlSection",
"(",
"$",
"node",
",",
"$",
"path",
"=",
"NULL",
")",
"{",
"$",
"path",
".=",
"$",
"path",
"?",
"'.'",
":",
"''",
";",
"// extend path by delimiter",
"foreach",
"(",
"$",
"node",
"as",
"$",
"child",
")",
"// ... | Reads sections and values of a XML file node, recursivly, and stores pairs in-situ.
@access protected
@param XML_Element $node Section XML node to read
@param string $path Path to this section
@return void | [
"Reads",
"sections",
"and",
"values",
"of",
"a",
"XML",
"file",
"node",
"recursivly",
"and",
"stores",
"pairs",
"in",
"-",
"situ",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/FS/File/Configuration/Reader.php#L243-L263 |
36,275 | CeusMedia/Common | src/FS/File/Configuration/Reader.php | FS_File_Configuration_Reader.loadYamlFile | protected function loadYamlFile( $fileName )
{
$array = FS_File_YAML_Reader::load( $fileName );
foreach( $array as $sectionName => $sectionData )
foreach( $sectionData as $key => $value )
$this->pairs[$sectionName.".".$key] = $value;
} | php | protected function loadYamlFile( $fileName )
{
$array = FS_File_YAML_Reader::load( $fileName );
foreach( $array as $sectionName => $sectionData )
foreach( $sectionData as $key => $value )
$this->pairs[$sectionName.".".$key] = $value;
} | [
"protected",
"function",
"loadYamlFile",
"(",
"$",
"fileName",
")",
"{",
"$",
"array",
"=",
"FS_File_YAML_Reader",
"::",
"load",
"(",
"$",
"fileName",
")",
";",
"foreach",
"(",
"$",
"array",
"as",
"$",
"sectionName",
"=>",
"$",
"sectionData",
")",
"foreach... | Loads Configuration from YAML File.
@access protected
@param string $fileName File Name of Configuration File
@return void | [
"Loads",
"Configuration",
"from",
"YAML",
"File",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/FS/File/Configuration/Reader.php#L271-L277 |
36,276 | CeusMedia/Common | src/FS/File/Configuration/Reader.php | FS_File_Configuration_Reader.tryToLoadFromCache | protected function tryToLoadFromCache( $cacheFile, $lastChange )
{
if( !file_exists( $cacheFile ) )
return FALSE;
$lastCache = @filemtime( $cacheFile );
if( $lastCache && $lastChange <= $lastCache )
{
$content = file_get_contents( $cacheFile );
$array = @unserialize( $content );
if( is_array( $ar... | php | protected function tryToLoadFromCache( $cacheFile, $lastChange )
{
if( !file_exists( $cacheFile ) )
return FALSE;
$lastCache = @filemtime( $cacheFile );
if( $lastCache && $lastChange <= $lastCache )
{
$content = file_get_contents( $cacheFile );
$array = @unserialize( $content );
if( is_array( $ar... | [
"protected",
"function",
"tryToLoadFromCache",
"(",
"$",
"cacheFile",
",",
"$",
"lastChange",
")",
"{",
"if",
"(",
"!",
"file_exists",
"(",
"$",
"cacheFile",
")",
")",
"return",
"FALSE",
";",
"$",
"lastCache",
"=",
"@",
"filemtime",
"(",
"$",
"cacheFile",
... | Gernates Cache File Name and tries to load Configuration from Cache File.
@access protected
@param string $cacheFile File Name of Cache File
@param int $lastChange Last Change of Configuration File
@return bool | [
"Gernates",
"Cache",
"File",
"Name",
"and",
"tries",
"to",
"load",
"Configuration",
"from",
"Cache",
"File",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/FS/File/Configuration/Reader.php#L316-L333 |
36,277 | spiral/models | src/AbstractEntity.php | AbstractEntity.packValue | public function packValue(): array
{
$result = [];
foreach ($this->fields as $field => $value) {
if ($value instanceof AccessorInterface) {
$result[$field] = $value->packValue();
} else {
$result[$field] = $value;
}
}
... | php | public function packValue(): array
{
$result = [];
foreach ($this->fields as $field => $value) {
if ($value instanceof AccessorInterface) {
$result[$field] = $value->packValue();
} else {
$result[$field] = $value;
}
}
... | [
"public",
"function",
"packValue",
"(",
")",
":",
"array",
"{",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"fields",
"as",
"$",
"field",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"value",
"instanceof",
"AccessorInterfac... | Pack entity fields into plain array.
@return array
@throws \Spiral\Models\Exception\AccessException | [
"Pack",
"entity",
"fields",
"into",
"plain",
"array",
"."
] | 7ad86808c938354dfc2aaaee824d72ee8a15b6fd | https://github.com/spiral/models/blob/7ad86808c938354dfc2aaaee824d72ee8a15b6fd/src/AbstractEntity.php#L268-L280 |
36,278 | spiral/models | src/AbstractEntity.php | AbstractEntity.createAccessor | protected function createAccessor(
$accessor,
string $name,
$value,
array $context = []
): AccessorInterface {
if (!is_string($accessor) || !class_exists($accessor)) {
throw new EntityException(
"Unable to create accessor for field `{$name}` in " .... | php | protected function createAccessor(
$accessor,
string $name,
$value,
array $context = []
): AccessorInterface {
if (!is_string($accessor) || !class_exists($accessor)) {
throw new EntityException(
"Unable to create accessor for field `{$name}` in " .... | [
"protected",
"function",
"createAccessor",
"(",
"$",
"accessor",
",",
"string",
"$",
"name",
",",
"$",
"value",
",",
"array",
"$",
"context",
"=",
"[",
"]",
")",
":",
"AccessorInterface",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"accessor",
")",
"||... | Create instance of field accessor.
@param mixed|string $accessor Might be entity implementation specific.
@param string $name
@param mixed $value
@param array $context Custom accessor context.
@return AccessorInterface|null
@throws \Spiral\Models\Exception\AccessException
@throws EntityException | [
"Create",
"instance",
"of",
"field",
"accessor",
"."
] | 7ad86808c938354dfc2aaaee824d72ee8a15b6fd | https://github.com/spiral/models/blob/7ad86808c938354dfc2aaaee824d72ee8a15b6fd/src/AbstractEntity.php#L362-L376 |
36,279 | spiral/models | src/AbstractEntity.php | AbstractEntity.getMutated | private function getMutated(string $name, bool $filter, $value)
{
$getter = $this->getMutator($name, self::MUTATOR_GETTER);
if ($filter && !empty($getter)) {
try {
return call_user_func($getter, $value);
} catch (\Exception $e) {
//Trying to f... | php | private function getMutated(string $name, bool $filter, $value)
{
$getter = $this->getMutator($name, self::MUTATOR_GETTER);
if ($filter && !empty($getter)) {
try {
return call_user_func($getter, $value);
} catch (\Exception $e) {
//Trying to f... | [
"private",
"function",
"getMutated",
"(",
"string",
"$",
"name",
",",
"bool",
"$",
"filter",
",",
"$",
"value",
")",
"{",
"$",
"getter",
"=",
"$",
"this",
"->",
"getMutator",
"(",
"$",
"name",
",",
"self",
"::",
"MUTATOR_GETTER",
")",
";",
"if",
"(",... | Get value thought associated mutator.
@param string $name
@param bool $filter
@param mixed $value
@return mixed | [
"Get",
"value",
"thought",
"associated",
"mutator",
"."
] | 7ad86808c938354dfc2aaaee824d72ee8a15b6fd | https://github.com/spiral/models/blob/7ad86808c938354dfc2aaaee824d72ee8a15b6fd/src/AbstractEntity.php#L387-L401 |
36,280 | spiral/models | src/AbstractEntity.php | AbstractEntity.setMutated | private function setMutated(string $name, $value)
{
$setter = $this->getMutator($name, self::MUTATOR_SETTER);
if (!empty($setter)) {
try {
$this->fields[$name] = call_user_func($setter, $value);
} catch (\Exception $e) {
//Exceptional situatio... | php | private function setMutated(string $name, $value)
{
$setter = $this->getMutator($name, self::MUTATOR_SETTER);
if (!empty($setter)) {
try {
$this->fields[$name] = call_user_func($setter, $value);
} catch (\Exception $e) {
//Exceptional situatio... | [
"private",
"function",
"setMutated",
"(",
"string",
"$",
"name",
",",
"$",
"value",
")",
"{",
"$",
"setter",
"=",
"$",
"this",
"->",
"getMutator",
"(",
"$",
"name",
",",
"self",
"::",
"MUTATOR_SETTER",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"... | Set value thought associated mutator.
@param string $name
@param mixed $value | [
"Set",
"value",
"thought",
"associated",
"mutator",
"."
] | 7ad86808c938354dfc2aaaee824d72ee8a15b6fd | https://github.com/spiral/models/blob/7ad86808c938354dfc2aaaee824d72ee8a15b6fd/src/AbstractEntity.php#L409-L422 |
36,281 | theodorejb/peachy-sql | lib/Mysql.php | Mysql.query | public function query(string $sql, array $params = []): Statement
{
$this->usedPrepare = false;
$stmt = $this->prepare($sql, $params);
$this->usedPrepare = true;
$stmt->execute();
return $stmt;
} | php | public function query(string $sql, array $params = []): Statement
{
$this->usedPrepare = false;
$stmt = $this->prepare($sql, $params);
$this->usedPrepare = true;
$stmt->execute();
return $stmt;
} | [
"public",
"function",
"query",
"(",
"string",
"$",
"sql",
",",
"array",
"$",
"params",
"=",
"[",
"]",
")",
":",
"Statement",
"{",
"$",
"this",
"->",
"usedPrepare",
"=",
"false",
";",
"$",
"stmt",
"=",
"$",
"this",
"->",
"prepare",
"(",
"$",
"sql",
... | Prepares and executes a single MySQL query with bound parameters | [
"Prepares",
"and",
"executes",
"a",
"single",
"MySQL",
"query",
"with",
"bound",
"parameters"
] | f179c6fa6c4293c2713b6b59022f3cfc90890a98 | https://github.com/theodorejb/peachy-sql/blob/f179c6fa6c4293c2713b6b59022f3cfc90890a98/lib/Mysql.php#L103-L110 |
36,282 | theodorejb/peachy-sql | lib/Mysql.php | Mysql.insertBatch | protected function insertBatch(string $table, array $colVals, int $identityIncrement = 1): BulkInsertResult
{
$sqlParams = (new Insert($this->options))->buildQuery($table, $colVals);
$result = $this->query($sqlParams->getSql(), $sqlParams->getParams());
$firstId = $result->getInsertId(); // ... | php | protected function insertBatch(string $table, array $colVals, int $identityIncrement = 1): BulkInsertResult
{
$sqlParams = (new Insert($this->options))->buildQuery($table, $colVals);
$result = $this->query($sqlParams->getSql(), $sqlParams->getParams());
$firstId = $result->getInsertId(); // ... | [
"protected",
"function",
"insertBatch",
"(",
"string",
"$",
"table",
",",
"array",
"$",
"colVals",
",",
"int",
"$",
"identityIncrement",
"=",
"1",
")",
":",
"BulkInsertResult",
"{",
"$",
"sqlParams",
"=",
"(",
"new",
"Insert",
"(",
"$",
"this",
"->",
"op... | Performs a single bulk insert query | [
"Performs",
"a",
"single",
"bulk",
"insert",
"query"
] | f179c6fa6c4293c2713b6b59022f3cfc90890a98 | https://github.com/theodorejb/peachy-sql/blob/f179c6fa6c4293c2713b6b59022f3cfc90890a98/lib/Mysql.php#L115-L129 |
36,283 | CeusMedia/Common | src/ADT/Graph/NodeSet.php | ADT_Graph_NodeSet.addNode | public function addNode( $nodeName, $nodeValue = false )
{
$newNode = new ADT_Graph_Node( $nodeName, $nodeValue );
if( !$this->isNode( $newNode ) )
{
$this->nodes[] = $newNode;
return $newNode;
}
else
return $this->getNode( $nodeName );
} | php | public function addNode( $nodeName, $nodeValue = false )
{
$newNode = new ADT_Graph_Node( $nodeName, $nodeValue );
if( !$this->isNode( $newNode ) )
{
$this->nodes[] = $newNode;
return $newNode;
}
else
return $this->getNode( $nodeName );
} | [
"public",
"function",
"addNode",
"(",
"$",
"nodeName",
",",
"$",
"nodeValue",
"=",
"false",
")",
"{",
"$",
"newNode",
"=",
"new",
"ADT_Graph_Node",
"(",
"$",
"nodeName",
",",
"$",
"nodeValue",
")",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"isNode",
"(... | Adds a new Node and returns reference of this Node.
@access public
@param string $nodeName Name of the new Node
@param string $nodeValue Value of the new Node
@return ADT_Graph_Node | [
"Adds",
"a",
"new",
"Node",
"and",
"returns",
"reference",
"of",
"this",
"Node",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/ADT/Graph/NodeSet.php#L51-L61 |
36,284 | CeusMedia/Common | src/ADT/Graph/NodeSet.php | ADT_Graph_NodeSet.getNode | public function getNode( $node )
{
for( $i=0; $i<$this->count(); $i++ )
if( $this->nodes[$i]->getNodeName() == $node )
return $this->nodes[$i];
return NULL;
} | php | public function getNode( $node )
{
for( $i=0; $i<$this->count(); $i++ )
if( $this->nodes[$i]->getNodeName() == $node )
return $this->nodes[$i];
return NULL;
} | [
"public",
"function",
"getNode",
"(",
"$",
"node",
")",
"{",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"$",
"this",
"->",
"count",
"(",
")",
";",
"$",
"i",
"++",
")",
"if",
"(",
"$",
"this",
"->",
"nodes",
"[",
"$",
"i",
"]",
"-... | Returns a Node of this NodeSet.
@access public
@param string $node Name of the new Node
@return ADT_Graph_Node | [
"Returns",
"a",
"Node",
"of",
"this",
"NodeSet",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/ADT/Graph/NodeSet.php#L101-L107 |
36,285 | CeusMedia/Common | src/ADT/Graph/NodeSet.php | ADT_Graph_NodeSet.getNodeIndex | private function getNodeIndex( $node )
{
for( $i=0; $i<$this->count(); $i++ )
if( $this->nodes[$i] == $node )
return $i;
return NULL;
} | php | private function getNodeIndex( $node )
{
for( $i=0; $i<$this->count(); $i++ )
if( $this->nodes[$i] == $node )
return $i;
return NULL;
} | [
"private",
"function",
"getNodeIndex",
"(",
"$",
"node",
")",
"{",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"$",
"this",
"->",
"count",
"(",
")",
";",
"$",
"i",
"++",
")",
"if",
"(",
"$",
"this",
"->",
"nodes",
"[",
"$",
"i",
"]"... | Returns index of a node in this NodeSet.
@access private
@param ADT_Graph_Node $node Node to get index for
@return int | [
"Returns",
"index",
"of",
"a",
"node",
"in",
"this",
"NodeSet",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/ADT/Graph/NodeSet.php#L115-L121 |
36,286 | CeusMedia/Common | src/ADT/Graph/NodeSet.php | ADT_Graph_NodeSet.removeNode | public function removeNode( $node )
{
if( !$this->isNode( $node ) )
throw new Exception( 'Edge is not existing.' );
$index = $this->getNodeIndex( $node );
unset( $this->nodes[$index] );
sort( $this->nodes );
} | php | public function removeNode( $node )
{
if( !$this->isNode( $node ) )
throw new Exception( 'Edge is not existing.' );
$index = $this->getNodeIndex( $node );
unset( $this->nodes[$index] );
sort( $this->nodes );
} | [
"public",
"function",
"removeNode",
"(",
"$",
"node",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isNode",
"(",
"$",
"node",
")",
")",
"throw",
"new",
"Exception",
"(",
"'Edge is not existing.'",
")",
";",
"$",
"index",
"=",
"$",
"this",
"->",
"get... | Removing a node.
@access public
@param ADT_Graph_Node $node Node to be removed
@return void | [
"Removing",
"a",
"node",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/ADT/Graph/NodeSet.php#L153-L160 |
36,287 | ncou/Chiron | src/Chiron/Http/Middleware/RequestLimitationsMiddleware.php | RequestLimitationsMiddleware.process | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
// *** Check limitation for the request uri length
if (mb_strlen($request->getServerParam('REQUEST_URI'), '8bit') > 2048) {
throw new UriTooLongHttpException();
}
... | php | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
// *** Check limitation for the request uri length
if (mb_strlen($request->getServerParam('REQUEST_URI'), '8bit') > 2048) {
throw new UriTooLongHttpException();
}
... | [
"public",
"function",
"process",
"(",
"ServerRequestInterface",
"$",
"request",
",",
"RequestHandlerInterface",
"$",
"handler",
")",
":",
"ResponseInterface",
"{",
"// *** Check limitation for the request uri length",
"if",
"(",
"mb_strlen",
"(",
"$",
"request",
"->",
"... | Throw an HTTP 414 Exception if the URI is too long.
Throw an HTTP 431 Exception if the headers fields are too large.
@param ServerRequestInterface $request request
@param RequestHandlerInterface $handler
@return object ResponseInterface | [
"Throw",
"an",
"HTTP",
"414",
"Exception",
"if",
"the",
"URI",
"is",
"too",
"long",
".",
"Throw",
"an",
"HTTP",
"431",
"Exception",
"if",
"the",
"headers",
"fields",
"are",
"too",
"large",
"."
] | bfb6f85faba0e54005896b09a7c34e456d1a1bed | https://github.com/ncou/Chiron/blob/bfb6f85faba0e54005896b09a7c34e456d1a1bed/src/Chiron/Http/Middleware/RequestLimitationsMiddleware.php#L27-L58 |
36,288 | CeusMedia/Common | src/FS/File/Log/Reader.php | FS_File_Log_Reader.load | public static function load( $fileName, $offset = NULL, $limit = NULL )
{
$file = new FS_File_Reader( $fileName );
$lines = $file->readArray();
if( $offset !== NULL && $limit !== NULL && (int) $limit !== 0 )
$lines = array_slice( $lines, abs( (int) $offset ), (int) $limit );
else if( $offset !== NULL && (i... | php | public static function load( $fileName, $offset = NULL, $limit = NULL )
{
$file = new FS_File_Reader( $fileName );
$lines = $file->readArray();
if( $offset !== NULL && $limit !== NULL && (int) $limit !== 0 )
$lines = array_slice( $lines, abs( (int) $offset ), (int) $limit );
else if( $offset !== NULL && (i... | [
"public",
"static",
"function",
"load",
"(",
"$",
"fileName",
",",
"$",
"offset",
"=",
"NULL",
",",
"$",
"limit",
"=",
"NULL",
")",
"{",
"$",
"file",
"=",
"new",
"FS_File_Reader",
"(",
"$",
"fileName",
")",
";",
"$",
"lines",
"=",
"$",
"file",
"->"... | Reads a Log File and returns Lines.
@access public
@static
@param string $uri URI of Log File
@param int $offset Offset from Start or End
@param int $limit Amount of Entries to return
@return array | [
"Reads",
"a",
"Log",
"File",
"and",
"returns",
"Lines",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/FS/File/Log/Reader.php#L66-L75 |
36,289 | CeusMedia/Common | src/FS/File/Log/Reader.php | FS_File_Log_Reader.read | public function read( $offset = NULL, $limit = NULL )
{
return $this->load( $this->fileName, $offset, $limit );
} | php | public function read( $offset = NULL, $limit = NULL )
{
return $this->load( $this->fileName, $offset, $limit );
} | [
"public",
"function",
"read",
"(",
"$",
"offset",
"=",
"NULL",
",",
"$",
"limit",
"=",
"NULL",
")",
"{",
"return",
"$",
"this",
"->",
"load",
"(",
"$",
"this",
"->",
"fileName",
",",
"$",
"offset",
",",
"$",
"limit",
")",
";",
"}"
] | Reads Log File and returns Lines.
@access public
@param int $offset Offset from Start or End
@param int $limit Amount of Entries to return
@return array | [
"Reads",
"Log",
"File",
"and",
"returns",
"Lines",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/FS/File/Log/Reader.php#L84-L87 |
36,290 | meritoo/common-library | src/ValueObject/Template.php | Template.isValid | private static function isValid(string $content): bool
{
if ('' === $content) {
return false;
}
return (bool)preg_match_all(static::getPlaceholderPattern(), $content);
} | php | private static function isValid(string $content): bool
{
if ('' === $content) {
return false;
}
return (bool)preg_match_all(static::getPlaceholderPattern(), $content);
} | [
"private",
"static",
"function",
"isValid",
"(",
"string",
"$",
"content",
")",
":",
"bool",
"{",
"if",
"(",
"''",
"===",
"$",
"content",
")",
"{",
"return",
"false",
";",
"}",
"return",
"(",
"bool",
")",
"preg_match_all",
"(",
"static",
"::",
"getPlac... | Returns information if given template is valid
@param string $content Raw string with placeholders to validate (content of the template)
@return bool | [
"Returns",
"information",
"if",
"given",
"template",
"is",
"valid"
] | b166b8b805ae97c15688d27323cae8976bd0f6dc | https://github.com/meritoo/common-library/blob/b166b8b805ae97c15688d27323cae8976bd0f6dc/src/ValueObject/Template.php#L91-L98 |
36,291 | meritoo/common-library | src/ValueObject/Template.php | Template.getPlaceholders | private static function getPlaceholders(string $content): array
{
$result = [];
$matchCount = preg_match_all(static::getPlaceholderPattern(), $content, $result);
if (false !== $matchCount && 0 < $matchCount) {
foreach ($result as $index => $placeholders) {
$resul... | php | private static function getPlaceholders(string $content): array
{
$result = [];
$matchCount = preg_match_all(static::getPlaceholderPattern(), $content, $result);
if (false !== $matchCount && 0 < $matchCount) {
foreach ($result as $index => $placeholders) {
$resul... | [
"private",
"static",
"function",
"getPlaceholders",
"(",
"string",
"$",
"content",
")",
":",
"array",
"{",
"$",
"result",
"=",
"[",
"]",
";",
"$",
"matchCount",
"=",
"preg_match_all",
"(",
"static",
"::",
"getPlaceholderPattern",
"(",
")",
",",
"$",
"conte... | Returns placeholders of given template
@param string $content Content of template
@return array | [
"Returns",
"placeholders",
"of",
"given",
"template"
] | b166b8b805ae97c15688d27323cae8976bd0f6dc | https://github.com/meritoo/common-library/blob/b166b8b805ae97c15688d27323cae8976bd0f6dc/src/ValueObject/Template.php#L106-L118 |
36,292 | CeusMedia/Common | src/UI/ClassParser.php | ClassParser.getClassData | public function getClassData()
{
$data = array(
"class" => $this->classData,
"imports" => $this->imports,
"methods" => $this->methods,
"vars" => $this->vars,
);
return $data;
} | php | public function getClassData()
{
$data = array(
"class" => $this->classData,
"imports" => $this->imports,
"methods" => $this->methods,
"vars" => $this->vars,
);
return $data;
} | [
"public",
"function",
"getClassData",
"(",
")",
"{",
"$",
"data",
"=",
"array",
"(",
"\"class\"",
"=>",
"$",
"this",
"->",
"classData",
",",
"\"imports\"",
"=>",
"$",
"this",
"->",
"imports",
",",
"\"methods\"",
"=>",
"$",
"this",
"->",
"methods",
",",
... | Returns an Array of all Properties of the Class.
@access public
@return array | [
"Returns",
"an",
"Array",
"of",
"all",
"Properties",
"of",
"the",
"Class",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/ClassParser.php#L143-L152 |
36,293 | CeusMedia/Common | src/UI/ClassParser.php | ClassParser.getValueOfDocLine | protected function getValueOfDocLine( $line, $pattern )
{
$parts = explode( $this->patterns[$pattern], $line );
$value = trim( $parts[1] );
return $value;
} | php | protected function getValueOfDocLine( $line, $pattern )
{
$parts = explode( $this->patterns[$pattern], $line );
$value = trim( $parts[1] );
return $value;
} | [
"protected",
"function",
"getValueOfDocLine",
"(",
"$",
"line",
",",
"$",
"pattern",
")",
"{",
"$",
"parts",
"=",
"explode",
"(",
"$",
"this",
"->",
"patterns",
"[",
"$",
"pattern",
"]",
",",
"$",
"line",
")",
";",
"$",
"value",
"=",
"trim",
"(",
"... | Returns the Value of a Documentation Line determined by a pattern.
@access protected
@param string $line Documentation Line
@param string $pattern Pattern to read Docuementation Line
@return string | [
"Returns",
"the",
"Value",
"of",
"a",
"Documentation",
"Line",
"determined",
"by",
"a",
"pattern",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/UI/ClassParser.php#L192-L197 |
36,294 | CeusMedia/Common | src/Alg/Parcel/Factory.php | Alg_Parcel_Factory.produce | public function produce( $packetName, $articles )
{
if( !in_array( $packetName, $this->packets ) )
throw new InvalidArgumentException( 'Packet "'.$packetName.'" is not a valid Packet.' );
try
{
$packet = new Alg_Parcel_Packet( $packetName );
foreach( $articles as $articleName => $articleQuantity )
{
... | php | public function produce( $packetName, $articles )
{
if( !in_array( $packetName, $this->packets ) )
throw new InvalidArgumentException( 'Packet "'.$packetName.'" is not a valid Packet.' );
try
{
$packet = new Alg_Parcel_Packet( $packetName );
foreach( $articles as $articleName => $articleQuantity )
{
... | [
"public",
"function",
"produce",
"(",
"$",
"packetName",
",",
"$",
"articles",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"packetName",
",",
"$",
"this",
"->",
"packets",
")",
")",
"throw",
"new",
"InvalidArgumentException",
"(",
"'Packet \"'",
".",
... | Produces a new Packet, filled with given Articles and returns it.
@access public
@param string $packetName Name of Packet Size
@param array $articles Articles to put into Packet
@return Alg_Parcel_Packet | [
"Produces",
"a",
"new",
"Packet",
"filled",
"with",
"given",
"Articles",
"and",
"returns",
"it",
"."
] | 1138adf9341782a6284c05884989f7497532bcf4 | https://github.com/CeusMedia/Common/blob/1138adf9341782a6284c05884989f7497532bcf4/src/Alg/Parcel/Factory.php#L73-L96 |
36,295 | ncou/Chiron | src/Chiron/Routing/RouteResult.php | RouteResult.fromRoute | public static function fromRoute(Route $route, array $params = []): self
{
$result = new self();
$result->success = true;
$result->route = $route;
$result->matchedParams = $params;
return $result;
} | php | public static function fromRoute(Route $route, array $params = []): self
{
$result = new self();
$result->success = true;
$result->route = $route;
$result->matchedParams = $params;
return $result;
} | [
"public",
"static",
"function",
"fromRoute",
"(",
"Route",
"$",
"route",
",",
"array",
"$",
"params",
"=",
"[",
"]",
")",
":",
"self",
"{",
"$",
"result",
"=",
"new",
"self",
"(",
")",
";",
"$",
"result",
"->",
"success",
"=",
"true",
";",
"$",
"... | Create an instance representing a route succes from the matching route.
@param array $params parameters associated with the matched route, if any | [
"Create",
"an",
"instance",
"representing",
"a",
"route",
"succes",
"from",
"the",
"matching",
"route",
"."
] | bfb6f85faba0e54005896b09a7c34e456d1a1bed | https://github.com/ncou/Chiron/blob/bfb6f85faba0e54005896b09a7c34e456d1a1bed/src/Chiron/Routing/RouteResult.php#L85-L93 |
36,296 | ncou/Chiron | src/Chiron/Routing/RouteResult.php | RouteResult.fromRouteFailure | public static function fromRouteFailure(?array $methods): self
{
$result = new self();
$result->success = false;
$result->allowedMethods = $methods;
return $result;
} | php | public static function fromRouteFailure(?array $methods): self
{
$result = new self();
$result->success = false;
$result->allowedMethods = $methods;
return $result;
} | [
"public",
"static",
"function",
"fromRouteFailure",
"(",
"?",
"array",
"$",
"methods",
")",
":",
"self",
"{",
"$",
"result",
"=",
"new",
"self",
"(",
")",
";",
"$",
"result",
"->",
"success",
"=",
"false",
";",
"$",
"result",
"->",
"allowedMethods",
"=... | Create an instance representing a route failure.
@param null|array $methods HTTP methods allowed for the current URI, if any.
null is equivalent to allowing any HTTP method; empty array means none. | [
"Create",
"an",
"instance",
"representing",
"a",
"route",
"failure",
"."
] | bfb6f85faba0e54005896b09a7c34e456d1a1bed | https://github.com/ncou/Chiron/blob/bfb6f85faba0e54005896b09a7c34e456d1a1bed/src/Chiron/Routing/RouteResult.php#L101-L108 |
36,297 | ncou/Chiron | src/Chiron/Routing/RouteResult.php | RouteResult.isMethodFailure | public function isMethodFailure(): bool
{
if ($this->isSuccess() || $this->allowedMethods === self::HTTP_METHOD_ANY) {
return false;
}
return true;
} | php | public function isMethodFailure(): bool
{
if ($this->isSuccess() || $this->allowedMethods === self::HTTP_METHOD_ANY) {
return false;
}
return true;
} | [
"public",
"function",
"isMethodFailure",
"(",
")",
":",
"bool",
"{",
"if",
"(",
"$",
"this",
"->",
"isSuccess",
"(",
")",
"||",
"$",
"this",
"->",
"allowedMethods",
"===",
"self",
"::",
"HTTP_METHOD_ANY",
")",
"{",
"return",
"false",
";",
"}",
"return",
... | Does the result represent failure to route due to HTTP method? | [
"Does",
"the",
"result",
"represent",
"failure",
"to",
"route",
"due",
"to",
"HTTP",
"method?"
] | bfb6f85faba0e54005896b09a7c34e456d1a1bed | https://github.com/ncou/Chiron/blob/bfb6f85faba0e54005896b09a7c34e456d1a1bed/src/Chiron/Routing/RouteResult.php#L129-L136 |
36,298 | ncou/Chiron | src/Chiron/Routing/RouteResult.php | RouteResult.getMatchedRouteMiddlewareStack | public function getMatchedRouteMiddlewareStack()
{
if ($this->isFailure()) {
return false;
}
if (! $this->matchedRouteMiddlewareStack && $this->route) {
$this->matchedRouteMiddlewareStack = $this->route->gatherMiddlewareStack();
}
return $this->match... | php | public function getMatchedRouteMiddlewareStack()
{
if ($this->isFailure()) {
return false;
}
if (! $this->matchedRouteMiddlewareStack && $this->route) {
$this->matchedRouteMiddlewareStack = $this->route->gatherMiddlewareStack();
}
return $this->match... | [
"public",
"function",
"getMatchedRouteMiddlewareStack",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isFailure",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"$",
"this",
"->",
"matchedRouteMiddlewareStack",
"&&",
"$",
"this",
"->",
... | Retrieve all the middlewares, if possible.
If this result represents a failure, return false; otherwise, return the
middleware of the Route + middleware of the RouteGroup.
@return false|array | [
"Retrieve",
"all",
"the",
"middlewares",
"if",
"possible",
"."
] | bfb6f85faba0e54005896b09a7c34e456d1a1bed | https://github.com/ncou/Chiron/blob/bfb6f85faba0e54005896b09a7c34e456d1a1bed/src/Chiron/Routing/RouteResult.php#L178-L189 |
36,299 | ncou/Chiron | src/Chiron/Routing/RouteResult.php | RouteResult.getAllowedMethods | public function getAllowedMethods(): ?array
{
if ($this->isSuccess()) {
return $this->route
? $this->route->getAllowedMethods()
: [];
}
return $this->allowedMethods;
} | php | public function getAllowedMethods(): ?array
{
if ($this->isSuccess()) {
return $this->route
? $this->route->getAllowedMethods()
: [];
}
return $this->allowedMethods;
} | [
"public",
"function",
"getAllowedMethods",
"(",
")",
":",
"?",
"array",
"{",
"if",
"(",
"$",
"this",
"->",
"isSuccess",
"(",
")",
")",
"{",
"return",
"$",
"this",
"->",
"route",
"?",
"$",
"this",
"->",
"route",
"->",
"getAllowedMethods",
"(",
")",
":... | Retrieve the allowed methods for the route failure.
@return null|string[] HTTP methods allowed | [
"Retrieve",
"the",
"allowed",
"methods",
"for",
"the",
"route",
"failure",
"."
] | bfb6f85faba0e54005896b09a7c34e456d1a1bed | https://github.com/ncou/Chiron/blob/bfb6f85faba0e54005896b09a7c34e456d1a1bed/src/Chiron/Routing/RouteResult.php#L207-L216 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.