/** * Create a new container. * * $container = Hive_Container::factory($owner, $relation); * * @param Hive owner of this container * @param Hive_Relation relation that generated this container * @return Hive_Container */ public static function factory(Hive $owner = NULL, Hive_Relation $relation = NULL) { $container = new Hive_Container(); if ($owner) { // Store the owner that created this container $container->owner($owner); } if ($relation) { // Store the relation that created this container $container->relation($relation); } return $container; }