Ejemplo n.º 1
0
 /**
  * Add an existent Options object to the array object.
  * If $pnPosition is int value, the object will be inserted in this array
  * positon.
  * Else, if $psIndex is given, it will be used to set the array key.
  * Or by default the array key will be the object id property.
  *
  * @param Onion\Application\Element\Options $poOptions
  * @param string $psIndex
  * @param string $pnPosition
  * @throws Exception
  * @return Onion\Application\Module
  */
 public function addOptions($poOptions, $psIndex = null, $pnPosition = null)
 {
     if ($poOptions instanceof Options) {
         return parent::add('_options', $poOptions, $psIndex, $pnPosition, true);
     } else {
         throw new Exception('$poOptions should be a instance of Onion\\Application\\Element\\Options!');
     }
 }
Ejemplo n.º 2
0
 /**
  * Add an existent Module object to the array object.
  * If $pnPosition is int value, the object will be inserted in this array
  * positon.
  * Else, if $psIndex is given, it will be used to set the array key.
  * Or by default the array key will be the object id property.
  *
  * @param Onion\Application\Module $poModule
  * @param string $psIndex
  * @param string $pnPosition
  * @throws Exception
  * @return Onion\Application\Section
  */
 public function addOption($poModule, $psIndex = null, $pnPosition = null)
 {
     if ($poModule instanceof Module) {
         return parent::add('_options', $poModule, $psIndex, $pnPosition);
     } else {
         throw new Exception('$poModule should be a instance of Onion\\Application\\Module!');
     }
 }
Ejemplo n.º 3
0
 /**
  * Add an existent Filter object to the array object.
  * If $pnPosition is int value, the object will be inserted in this array
  * positon.
  * Else, if $psIndex is given, it will be used to set the array key.
  * Or by default the array key will be the object id property.
  *
  * @param Onion\Application\Element\Filter $poFilter
  * @param string $psIndex
  * @param string $pnPosition
  * @throws Exception
  * @return Onion\Application\Action
  */
 public function addFilter($poFilter, $psIndex = null, $pnPosition = null)
 {
     if ($poFilter instanceof Filter) {
         return parent::add('_filter', $poFilter, $psIndex, $pnPosition, true);
     } else {
         throw new Exception('$poFilter should be a instance of Onion\\Application\\Element\\Filter!');
     }
 }
Ejemplo n.º 4
0
 /**
  * Add a separate to the array object.
  * If $pnPosition is int value, the object will be inserted in this array
  * positon.
  * Else, if $psIndex is given, it will be used to set the array key.
  * Or by default the array key will be the object id property.
  *
  * @param string $pnIndex
  * @param string $pnPosition
  * @return Onion\Application\Element\Options
  */
 public function addSeparate($pnIndex = null, $pnPosition = null)
 {
     return parent::add('_itens', null, $pnIndex, $pnPosition, true);
 }