понедельник, 6 февраля 2012 г.

PHP febr.6.

bool class_alias ([ string $original [, string $alias ]] ) = izveido jauno klasi, kas ir alias esošai klasei.
void __autoload ( string $class ) = autiomatiski ielade klasi tad, kad tiek izsauta nedefineta klasse. Deprikated ar citu funkciju 
function __autoload($class_name) {
    include $class_name . '.php';
}
---------------------------------- 
bool class_exists ( string $class_name [, bool $autoload = true ] ) 
string get_called_class ( void ) = atgriez klasi kur atrodas statiska metode
array get_class_methods ( mixed $class_name ) = atdot metodes nosaukumus,  $class_name = pats objekts vai nosaukums
array get_class_vars ( string $class_name ) = atdot īpašības pēc noklusējuma
string get_class ([ object $object = NULL ] ) = no ārpus objekta un argument ir aobjekt = iegustam nosaukumu. No iekšpuses atdot pašreizejas klases nosaukumu.
array get_declared_classes ( void ) = atdot massivu ar 
array get_declared_interfaces ( void ) = atdot ar massivu ar interfeicem
array get_declared_traits ( void ) = dod iespēju izmantot metodes no citiem objektiem
array get_object_vars ( object $object ) = massīvs ar visam oieejamiem īpašibām no objekta
string get_parent_class ([ mixed $object ] )
bool interface_exists ( string $interface_name [, bool $autoload = true ] ) = vai interfeis pastav
bool is_a ( object $object , string $class_name [, bool $allow_string = FALSE ] ) = 
bool is_subclass_of ( mixed $object , string $class_name [, bool $allow_string = TRUE ] )
bool method_exists ( mixed $object , string $method_name )
bool property_exists ( mixed $class , string $property )
bool trait_exists ( string $traitname [, bool $autoload ] )
array class_parents ( mixed $class [, bool $autoload = true ] )
array class_uses ( mixed $class [, bool $autoload = true ] )
-----------------------------------
array spl_autoload_functions ( void )
bool spl_autoload_register ([ callback $autoload_function [, bool $throw = true [, bool $prepend = false ]]] ) = dod iespēju reģistrēt vairākas funkcijas;  $throw = true - error ja nevar reģistrēt;$prepend = true pievienot rindas sakumā;
bool spl_autoload_unregister ( mixed $autoload_function ) = atriģistre auto_load funkciju
string spl_object_hash ( object $obj ) = atdot hash vērtību
-----------------------------------
<?

function myLoad($name){
require($name.'.php');
}

spl_autoload_register('myLoad');

$klase = new MyClass;

$klase->metode();
-----------------------------------
















Комментариев нет:

Отправить комментарий