/** * factory for creating atom object instances * * factory for creating atom object instances * * @param integer $offset The offset of the atom (in bytes) * @param integer $size The size of the atom (in bytes) * @param string $type The type of the atom * * @return object An instance of the Atom-class * @author Benjamin Carl <*****@*****.**> * @version 0.1 * @since Method available since Release 0.1 * @access public */ public static function factory($offset, $size, $type) { // instanciate a new atom-object $atom = new Atom(); // setup ... $atom->setOffset($offset); $atom->setSize($size); $atom->setType($type); // and give back ... return $atom; }