src/classes/CCOrbit/Ship.php
public static function create( $path ) 
	{	
		if ( is_null( $path ) ) 
		{
			return new static();
		}
		
		// use the orbit path if we are relative
		if ( substr( $path, 0, 1 ) != '/' ) 
		{
			$path = ORBITPATH.$path;
		}
		
		// check the path
		if ( substr( $path, -1 ) != '/' ) 
		{
			$path .= '/';
		}
		
		$blueprint = $path.'blueprint.json';
		
		if ( !file_exists( $blueprint ) ) 
		{
			throw new CCException( "CCOrbit_Ship::create - clould not find a blueprint at {$blueprint}." );
		}
		
		if ( !$blueprint_data = CCJson::read( $blueprint ) )
		{
			throw new CCException( "CCOrbit_Ship::create - invalid blueprint at {$blueprint}." );
		}
		
		return static::blueprint( $blueprint_data, $path );
	}
public static function create( $path ) 
	{	
		if ( is_null( $path ) ) 
		{
			return new static();
		}
		
		// use the orbit path if we are relative
		if ( substr( $path, 0, 1 ) != '/' ) 
		{
			$path = ORBITPATH.$path;
		}
		
		// check the path
		if ( substr( $path, -1 ) != '/' ) 
		{
			$path .= '/';
		}
		
		$blueprint = $path.'blueprint.json';
		
		if ( !file_exists( $blueprint ) ) 
		{
			throw new CCException( "CCOrbit_Ship::create - clould not find a blueprint at {$blueprint}." );
		}
		
		if ( !$blueprint_data = CCJson::read( $blueprint ) )
		{
			throw new CCException( "CCOrbit_Ship::create - invalid blueprint at {$blueprint}." );
		}
		
		return static::blueprint( $blueprint_data, $path );
	}
public static function create ( $ path ) { if ( is_null ( $ path ) ) { return new static ( ) ; } // use the orbit path if we are relative if ( substr ( $ path , 0 , 1 ) != '/' ) { $ path = ORBITPATH . $ path ; } // check the path if ( substr ( $ path , - 1 ) != '/' ) { $ path .= '/' ; } $ blueprint = $ path . 'blueprint.json' ; if ( ! file_exists ( $ blueprint ) ) { throw new CCException ( "CCOrbit_Ship::create - clould not find a blueprint at {$blueprint}." ) ; } if ( ! $ blueprint_data = CCJson :: read ( $ blueprint ) ) { throw new CCException ( "CCOrbit_Ship::create - invalid blueprint at {$blueprint}." ) ; } return static :: blueprint ( $ blueprint_data , $ path ) ; }
create an new ship object from path

@param string 		$path
@return CCOrbit_Ship
create an new ship object from path