src/Alg/Parcel/Packet.php
public function addArticle( $name, $volume )
	{
		if( !$this->hasVolumeLeft( $volume ) )
			throw new OutOfRangeException( 'Article "'.$name.'" does not fit in this Packet "'.$this->name.'".' );
		if( !isset( $this->articles[$name] ) )
			$this->articles[$name]	= 0;
		$this->articles[$name]++;
		$this->volume	+= $volume;
	}
public function addArticle( $name, $volume )
	{
		if( !$this->hasVolumeLeft( $volume ) )
			throw new OutOfRangeException( 'Article "'.$name.'" does not fit in this Packet "'.$this->name.'".' );
		if( !isset( $this->articles[$name] ) )
			$this->articles[$name]	= 0;
		$this->articles[$name]++;
		$this->volume	+= $volume;
	}
public function addArticle ( $ name , $ volume ) { if ( ! $ this -> hasVolumeLeft ( $ volume ) ) throw new OutOfRangeException ( 'Article "' . $ name . '" does not fit in this Packet "' . $ this -> name . '".' ) ; if ( ! isset ( $ this -> articles [ $ name ] ) ) $ this -> articles [ $ name ] = 0 ; $ this -> articles [ $ name ] ++ ; $ this -> volume += $ volume ; }
Adds an Article to Packet.
@access		public
@param		string		$name		Article Name
@param		string		$volume		Article Volume for this Packet Size
@return		void
Adds an Article to Packet .