This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const STATUSES = [ | |
| 'NEW' => RiideStates::STATE_REQUESTED, //The booking was created | |
| 'SCHEDULED' => RiideStates::STATE_REQUESTED, //The booking was created as prebooking | |
| 'ASSIGN' => RiideStates::STATE_REQUESTED, // The booking was assigned to a driver | |
| 'BACKTOBASE' => RiideStates::STATE_REQUESTED, // Booking was sent back to the dispatch | |
| 'PAUSE' => RiideStates::STATE_ACCEPTED, // The booking is paused. | |
| 'PAUSED' => RiideStates::STATE_ACCEPTED, // The booking is paused., | |
| 'ARRIVED' => RiideStates::STATE_ARRIVED, // Driver arrived at pickup location | |
| 'NOSHOW' => RiideStates::STATE_NO_SHOW, // The passenger did not show up. | |
| 'ENROUTE' => RiideStates::STATE_EN_ROUTE, // Driver is driving to the pickup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Budget\Models\Project\Item; | |
| use Budget\Models\Project\Item\Allocation\Allocation; | |
| use Budget\Models\Project\Project; | |
| use Nodes\Database\Repository as NodesRepository; | |
| use Nodes\Exception\Exception; | |
| /** | |
| * Class ItemRepository |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // determine notification type | |
| if ($this->request->data['Message']['send_as_push'] == false) { | |
| // Mark push notification as sent if msg should not be pushed | |
| $this->request->data['Message']['is_push_send'] = true; | |
| } else { | |
| $this->request->data['Message']['is_push_send'] = false; | |
| } | |
| foreach ($recepients as $r) { | |
| $this->request->data['Message']['reciever_user_id'] = $r['FrontendUser']['id']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Puzz\Core; | |
| use Illuminate\Support\Facades\Cache; | |
| use Nodes\Exception\Exception; | |
| /** | |
| * Class CacheHelper | |
| * @author cr@nodes.dk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function getAllForAPI() | |
| { | |
| // Lets try to look up in cache, hopefuly there is something there | |
| $contacts = Cache::get('contacts') | |
| // Is there something? | |
| if(!empty($contacts) { | |
| // Yep, lucky us, let's just return that instead of wasting time in DB | |
| return $contacts; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function __call($method, $arg) { | |
| if(substr($method, 0, strlen('enqueue')) === 'enqueue') { | |
| $method = str_replace('enqueue', '', $method); | |
| if(method_exists($this, $method)) { | |
| \Queue::push(new NodesCommand([ | |
| 'class' => get_class($this), | |
| 'function' => $method, | |
| 'params' => $arg | |
| ])); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| {"name": "Afghanistan", "code": "AF"}, | |
| {"name": "Åland Islands", "code": "AX"}, | |
| {"name": "Albania", "code": "AL"}, | |
| {"name": "Algeria", "code": "DZ"}, | |
| {"name": "American Samoa", "code": "AS"}, | |
| {"name": "AndorrA", "code": "AD"}, | |
| {"name": "Angola", "code": "AO"}, | |
| {"name": "Anguilla", "code": "AI"}, | |
| {"name": "Antarctica", "code": "AQ"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| {"name": "Afghanistan", "code": "AF"}, | |
| {"name": "Åland Islands", "code": "AX"}, | |
| {"name": "Albania", "code": "AL"}, | |
| {"name": "Algeria", "code": "DZ"}, | |
| {"name": "American Samoa", "code": "AS"}, | |
| {"name": "AndorrA", "code": "AD"}, | |
| {"name": "Angola", "code": "AO"}, | |
| {"name": "Anguilla", "code": "AI"}, | |
| {"name": "Antarctica", "code": "AQ"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function test1() { | |
| $this->FrontendUser->find('all',[ | |
| 'limit' => 1000, | |
| ]); | |
| $this->respond(200, true); | |
| } | |
| public function test2() { | |
| $this->FrontendUser->find('all',[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (!empty($this->request->query['search'])) { | |
| $conditions = array_merge($conditions, array($this->Listing->getSearchConditions($this->request->query['search']))); | |
| } | |
| switch ($this->request->query('searchState')) { | |
| case 'archived': | |
| $conditions = array_merge($conditions, array($this->Listing->getArchivedConditions($expireTime))); | |
| break; | |
| case 'all': | |
| break; |