for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Germania\Websites;
class Websites implements WebsitesInterface
{
/**
* @var array
*/
public $websites = array();
* @return UserInterface
* @throws WebsiteNotFoundException
* @uses $websites
public function get( $id )
if ($this->has( $id )) {
return $this->websites[ $id ];
}
throw new WebsiteNotFoundException("Could not find Website with ID '$id'");
* @return boolean
public function has ($id )
return array_key_exists( $id, $this->websites);
* @return ArrayIterator
public function getIterator()
return new \ArrayIterator( $this->websites );
* @return int
public function count()
return count($this->websites);