public function getAllOptions($filteringOption = null)
    {
        if (is_null($filteringOption)) {
            return array_values($this->container);
        } else {
            $result = array();

            foreach ($this->container as $key => $options) {
                if (isset($options[$filteringOption])) {
                    $result[] = $options[$filteringOption];
                } else {
                    trigger_error('Attempted to filter by non-existing option', \E_USER_ERROR);
                }
            }

            return $result;
        }
    }
public function getAllOptions($filteringOption = null)
    {
        if (is_null($filteringOption)) {
            return array_values($this->container);
        } else {
            $result = array();

            foreach ($this->container as $key => $options) {
                if (isset($options[$filteringOption])) {
                    $result[] = $options[$filteringOption];
                } else {
                    trigger_error('Attempted to filter by non-existing option', \E_USER_ERROR);
                }
            }

            return $result;
        }
    }
public function getAllOptions ( $ filteringOption = null ) { if ( is_null ( $ filteringOption ) ) { return array_values ( $ this -> container ) ; } else { $ result = array ( ) ; foreach ( $ this -> container as $ key => $ options ) { if ( isset ( $ options [ $ filteringOption ] ) ) { $ result [ ] = $ options [ $ filteringOption ] ; } else { trigger_error ( 'Attempted to filter by non-existing option' , \ E_USER_ERROR ) ; } } return $ result ; } }
Return options from the collection

@param string $filteringOption Can be optionally filtered by one option
@return array
Return options from the collection