protected function _receive_post($task = false, $primary = false)
    {
        if (!$this->table_name && !$this->query)
            $this->table_name = $this->_humanize(mb_substr($this->table, mb_strlen($this->prefix)));
        if ($task)
        {
            switch ($task)
            {
                case 'create':
                    $this->task = $task;
                    $this->before = $task;
                    return;
                    break;
                case 'edit':
                case 'view':
                    if ($primary !== false)
                    {
                        $this->task = $task;
                        $this->before = $task;
                        $this->primary_val = $primary;
                        return;
                    }
                    break;
                case 'list':
                    $this->task = $task;
                    return;
                    break;
            }
        }
        else
        {
            $this->task = $this->_post('task', 'list');
        }
        if ($this->is_get)
        {
            $this->task = $this->_get('task');
            $this->primary_val = $this->_get('primary');
        }
        else
        {
            $this->order_column = $this->_post('orderby', false, 'key');
            $this->order_direct = $this->_post('order') == 'desc' ? 'desc' : 'asc';
            if ($this->order_column)
            {
                if (!$this->query)
                    $this->order_column = key($this->_parse_field_names($this->order_column, 'receive_post', false, false));
                if (isset($this->order_by[$this->order_column]))
                    unset($this->order_by[$this->order_column]);
                $this->order_by = array_merge(array($this->order_column => $this->order_direct), $this->order_by);
            }

            $this->search = $this->_post('search', $this->search, 'int');
            if ($this->search)
            {
                $this->column = $this->_post('column', false, 'key');
                $this->phrase = $this->_post('phrase');
                $this->range = $this->_post('range', '');
            }
            $this->start = $this->_post('start', 0, 'int');
            $this->limit = $this->_post('limit', ($this->limit ? $this->limit : Fruit_config::$limit));
            $this->after = $this->_post('after');
            $this->primary_val = $this->_post('primary');

        }
    }
protected function _receive_post($task = false, $primary = false)
    {
        if (!$this->table_name && !$this->query)
            $this->table_name = $this->_humanize(mb_substr($this->table, mb_strlen($this->prefix)));
        if ($task)
        {
            switch ($task)
            {
                case 'create':
                    $this->task = $task;
                    $this->before = $task;
                    return;
                    break;
                case 'edit':
                case 'view':
                    if ($primary !== false)
                    {
                        $this->task = $task;
                        $this->before = $task;
                        $this->primary_val = $primary;
                        return;
                    }
                    break;
                case 'list':
                    $this->task = $task;
                    return;
                    break;
            }
        }
        else
        {
            $this->task = $this->_post('task', 'list');
        }
        if ($this->is_get)
        {
            $this->task = $this->_get('task');
            $this->primary_val = $this->_get('primary');
        }
        else
        {
            $this->order_column = $this->_post('orderby', false, 'key');
            $this->order_direct = $this->_post('order') == 'desc' ? 'desc' : 'asc';
            if ($this->order_column)
            {
                if (!$this->query)
                    $this->order_column = key($this->_parse_field_names($this->order_column, 'receive_post', false, false));
                if (isset($this->order_by[$this->order_column]))
                    unset($this->order_by[$this->order_column]);
                $this->order_by = array_merge(array($this->order_column => $this->order_direct), $this->order_by);
            }

            $this->search = $this->_post('search', $this->search, 'int');
            if ($this->search)
            {
                $this->column = $this->_post('column', false, 'key');
                $this->phrase = $this->_post('phrase');
                $this->range = $this->_post('range', '');
            }
            $this->start = $this->_post('start', 0, 'int');
            $this->limit = $this->_post('limit', ($this->limit ? $this->limit : Fruit_config::$limit));
            $this->after = $this->_post('after');
            $this->primary_val = $this->_post('primary');

        }
    }
protected function _receive_post ( $ task = false , $ primary = false ) { if ( ! $ this -> table_name && ! $ this -> query ) $ this -> table_name = $ this -> _humanize ( mb_substr ( $ this -> table , mb_strlen ( $ this -> prefix ) ) ) ; if ( $ task ) { switch ( $ task ) { case 'create' : $ this -> task = $ task ; $ this -> before = $ task ; return ; break ; case 'edit' : case 'view' : if ( $ primary !== false ) { $ this -> task = $ task ; $ this -> before = $ task ; $ this -> primary_val = $ primary ; return ; } break ; case 'list' : $ this -> task = $ task ; return ; break ; } } else { $ this -> task = $ this -> _post ( 'task' , 'list' ) ; } if ( $ this -> is_get ) { $ this -> task = $ this -> _get ( 'task' ) ; $ this -> primary_val = $ this -> _get ( 'primary' ) ; } else { $ this -> order_column = $ this -> _post ( 'orderby' , false , 'key' ) ; $ this -> order_direct = $ this -> _post ( 'order' ) == 'desc' ? 'desc' : 'asc' ; if ( $ this -> order_column ) { if ( ! $ this -> query ) $ this -> order_column = key ( $ this -> _parse_field_names ( $ this -> order_column , 'receive_post' , false , false ) ) ; if ( isset ( $ this -> order_by [ $ this -> order_column ] ) ) unset ( $ this -> order_by [ $ this -> order_column ] ) ; $ this -> order_by = array_merge ( array ( $ this -> order_column => $ this -> order_direct ) , $ this -> order_by ) ; } $ this -> search = $ this -> _post ( 'search' , $ this -> search , 'int' ) ; if ( $ this -> search ) { $ this -> column = $ this -> _post ( 'column' , false , 'key' ) ; $ this -> phrase = $ this -> _post ( 'phrase' ) ; $ this -> range = $ this -> _post ( 'range' , '' ) ; } $ this -> start = $ this -> _post ( 'start' , 0 , 'int' ) ; $ this -> limit = $ this -> _post ( 'limit' , ( $ this -> limit ? $ this -> limit : Fruit_config :: $ limit ) ) ; $ this -> after = $ this -> _post ( 'after' ) ; $ this -> primary_val = $ this -> _post ( 'primary' ) ; } }
receiving user data
receiving user data