Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117752313
PEAR5.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
PEAR5.php
View Options
<?php
/**
* This is only meant for PHP 5 to get rid of certain strict warning
* that doesn't get hidden since it's in the shutdown function
*/
class
PEAR5
{
/**
* If you have a class that's mostly/entirely static, and you need static
* properties, you can use this method to simulate them. Eg. in your method(s)
* do this: $myVar = &PEAR5::getStaticProperty('myclass', 'myVar');
* You MUST use a reference, or they will not persist!
*
* @access public
* @param string $class The calling classname, to prevent clashes
* @param string $var The variable to retrieve.
* @return mixed A reference to the variable. If not set it will be
* auto initialised to NULL.
*/
static
function
&
getStaticProperty
(
$class
,
$var
)
{
static
$properties
;
if
(!
isset
(
$properties
[
$class
]))
{
$properties
[
$class
]
=
array
();
}
if
(!
array_key_exists
(
$var
,
$properties
[
$class
]))
{
$properties
[
$class
][
$var
]
=
null
;
}
return
$properties
[
$class
][
$var
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Apr 4, 4:00 AM (9 h, 7 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e6/85/571c1d0a4a854fa940a6d9b9c7b3
Default Alt Text
PEAR5.php (1 KB)
Attached To
Mode
R113 roundcubemail
Attached
Detach File
Event Timeline