<?php



use Idearia\Logger;



class AccProducts extends BaseObject {



	public function __construct() {

		parent::__construct("AccModel");

	}



	/* MAIN LOGIC */



	public function load($branchId) {



		Logger::debug( "Loading AccProducts({$branchId})" );



		if ($productData = $this->model()->getProducts($branchId)) {

			$this->props($productData);

			$this->isLoaded(true);



			Logger::info( "AccProducts loaded" );



			return true;

		} else {

			Logger::error( "AccProducts({$branchId}) failed to load" );



			return false;

		}

	}



	/* DATA LOGIC */





	/* PUBLIC SETTERS */





	/* PUBLIC GETTERS */



	public function getProducts() {

		return $this->prop("Products");

	}





	/* PRIVATE LOGIC */









}