This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class Basket | |
*/ | |
class Basket | |
{ | |
protected $productsQuantityCollection; | |
protected $productsCollection; | |
protected $tax = 1.2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class AdsTypeCollection | |
*/ | |
class AdsTypeCollection implements Iterator{ | |
const PANORAMA_980x120 = 'PANORAMA_980x120'; | |
const TOP_BANNER = 'TOP_BANNER_930x180'; | |
const NETBOARD = 'NETBOARD_580x400'; | |
const VERTICAL_RECTANGLE = 'VERTICAL_RECTANGLE_240x400'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// IteratorIterator is a wrapper to work with others Iterator | |
/** | |
* Class ImagesFilter | |
*/ | |
class ImagesFilter extends IteratorIterator | |
{ | |
/** | |
* @param $status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class Skills | |
*/ | |
class Skills implements RecursiveIterator{ | |
protected $data; | |
protected $position; | |
/** | |
* Skills constructor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class ObjectPicker | |
*/ | |
class ObjectPicker implements SeekableIterator{ | |
protected $data = array(); | |
protected $position = 0; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class EmployeesCollection | |
*/ | |
class EmployeesCollection implements Countable | |
{ | |
protected $employees = array(); | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Example 1, alphabetic order | |
$availableServices = ['Building a website', 'SEO', 'SEM', 'Logo design', 'Mobile applications']; | |
$servicesCollection = new ArrayIterator($availableServices); | |
$servicesCollection->natsort(); | |
foreach ($servicesCollection as $service) { | |
print_r((array)$service); | |
} | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class Message | |
*/ | |
class Message | |
{ | |
public $title; | |
public $body; | |
public $attachments = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$userInput = array( | |
'user' => array( | |
'name' => 'Mario', | |
'surname' => 'Rossi', | |
'address' => array( | |
'home' => 'via di qui, 23', | |
'work' => 'wherever plaza', | |
) | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class ServerList | |
*/ | |
class ServersList extends RecursiveArrayIterator | |
{ | |
} | |
/** |
OlderNewer