array aggregate_info   
array aggregate_info ( object $object )
Pobiera informacje o agregacji  dla danego obiektu.
Parametry
- object
- 
Zwracane wartości
Zwraca informacje o agregacji jako tablicę asocjacyjną, tablicy metod i właściwości. Kluczem do głównej tablicy jest nazwa zagregowanej klasy
Listing
//Example #1 Użycie aggregate_info()
<?php
class Slicer {
var $vegetable;
function Slicer($vegetable)
{
$this->vegetable = $vegetable;
}
function slice_it($num_cuts)
{
echo "Czynimy pewne proste cięcie\n";
for ($i=0; $i < $num_cuts; $i++) {
// do some slicing
}
}
}
class Dicer {
var $vegetable;
var $rotation_angle = 90; // degrees
function Dicer($vegetable)
{
$this->vegetable = $vegetable;
}
function dice_it($num_cuts)
{
echo "Cięcie w jednym kierunku\n";
for ($i=0; $i < $num_cuts; $i++) {
// robimy trochę cięć
}
$this->rotate($this->rotation_angle);
echo "Cięcie w drugim kierunku\n";
for ($i=0; $i < $num_cuts; $i++) {
// robimy trochę więcej cieć
}
}
function rotate($deg)
{
echo "Treaz obracamy {$this->vegetable} {$deg} degrees\n";
}
function _secret_super_dicing($num_cuts)
{
// tak tajne że nie możemy pokazać ;-)
}
}
$obj = new Slicer('onion');
aggregate($obj, 'Dicer');
print_r(aggregate_info($obj));
?>
//Powyższy przykład wyświetli:
Array
(
[dicer] => Array
(
[methods] => Array
(
[0] => dice_it
[1] => rotate
)
[properties] => Array
(
[0] => rotation_angle
)
)
)
Dodano przez: igor  
Ranga: Administrator serwisu Punktów: 0
Ranga: Administrator serwisu Punktów: 0
Komentarze użytkowników
:: Losowe artykuły 

:: Wymiana linków 
    
	Modowe inspiracje |
        Android Gry i Aplikacje |
        ZaplanujTransport.pl: Przeprowadzki, transport, aukcje |
        Logo dla firmy |
        Change Tires - Car Weather Forecast Reminder |
        Laminas: MVC Framework for PHP |
        IT Books Reviews and Programming: JS, JAVA, PHP, ANDROID, CSS | 
        Katalog roślin |
        Programming articles: JAVA, PHP, C++, Python, JavaScript |
        Kancelaria Adwokacka Łukasz Huszno
        
    

 
  
				

 
                             
 


 
                        
 
		 
	