/** * Overridden to handle special getMyId method for convenience. */ public function __construct( R1soft_Remote $connection, $user = null ) { if( is_null( $user ) ) { parent::__construct( $connection, $connection->user->getMyId() ); } else { parent::__construct( $connection, $user ); } }
/** * * @param R1soft_Object $parent * @param mixed $id */ public function __construct( R1soft_Object $parent, $id ) { if( is_null( $parent ) ) { $this->_setInvalid(); throw new R1soft_Object_Exception( 'ChildObject must have a valid parent' ); } else { $this->_parent = $parent; parent::__construct( $parent->getConnection(), $id ); } }