getExtractedToolbox() public static method

This returns all the components of the currently selected toolbox. Returns the components in the following order: # OODB instance (getRedBean()) # Database Adapter # Query Writer # Toolbox itself
public static getExtractedToolbox ( ) : array
return array
Exemplo n.º 1
0
 /**
  * Test whether we can obtain a toolbox properly.
  *
  * @return void
  */
 public function testCanWeObtainToolbox()
 {
     $toolbox = R::getToolBox();
     asrt($toolbox instanceof TB, TRUE);
     $extractedToolbox = R::getExtractedToolbox();
     asrt(is_array($extractedToolbox), TRUE);
     asrt(count($extractedToolbox), 4);
     asrt($extractedToolbox[0] instanceof OODB, TRUE);
     asrt($extractedToolbox[1] instanceof Adapter, TRUE);
     asrt($extractedToolbox[2] instanceof QueryWriter, TRUE);
     asrt($extractedToolbox[3] instanceof TB, TRUE);
     $beanHelper = new SimpleFacadeBeanHelper();
     $toolbox2 = $beanHelper->getToolbox();
     asrt($toolbox2 instanceof TB, TRUE);
     asrt($toolbox, $toolbox2);
     $extractedToolbox = $beanHelper->getExtractedToolbox();
     asrt(is_array($extractedToolbox), TRUE);
     asrt(count($extractedToolbox), 4);
     asrt($extractedToolbox[0] instanceof OODB, TRUE);
     asrt($extractedToolbox[1] instanceof Adapter, TRUE);
     asrt($extractedToolbox[2] instanceof QueryWriter, TRUE);
     asrt($extractedToolbox[3] instanceof TB, TRUE);
 }
Exemplo n.º 2
0
 public function getExtractedToolbox()
 {
     return Facade::getExtractedToolbox();
 }