Author: Ariel Sommeria-klein
コード例 #1
0
        return $intNumber1 + $intNumber2;
    }
    /**
     * Returns the Date as a QDateTime.
     * Note that the QSoapService handler will automatically convert to a valid
     * SOAP dateTime.
     * 
     * @param int $intMonth
     * @param int $intDay
     * @param int $intYear
     * @return QDateTime
     */
    public function GetDate($intMonth, $intDay, $intYear)
    {
        $dttToReturn = new QDateTime($intYear . '-' . $intMonth . '-' . $intDay);
        return $dttToReturn;
    }
    /**
     * Gets all the Person objects with a certain last name as an array
     * 
     * @param string $strLastName
     * @return Person[]
     */
    public function GetPeople($strLastName)
    {
        return Person::QueryArray(QQ::Equal(QQN::Person()->LastName, $strLastName));
    }
}
// We need to RUN the WebService (just like how we run a QForm)
ExampleService::Run('ExampleService', 'http://examples.qcu.be');
コード例 #2
0
ファイル: example_service.php プロジェクト: qcodo/qcodo
        return $intNumber1 + $intNumber2;
    }
    /**
     * Returns the Date as a QDateTime.
     * Note that the QSoapService handler will automatically convert to a valid
     * SOAP dateTime.
     * 
     * @param int $intMonth
     * @param int $intDay
     * @param int $intYear
     * @return QDateTime
     */
    public function GetDate($intMonth, $intDay, $intYear)
    {
        $dttToReturn = new QDateTime($intYear . '-' . $intMonth . '-' . $intDay);
        return $dttToReturn;
    }
    /**
     * Gets all the Person objects with a certain last name as an array
     * 
     * @param string $strLastName
     * @return Person[]
     */
    public function GetPeople($strLastName)
    {
        return Person::QueryArray(QQ::Equal(QQN::Person()->LastName, $strLastName));
    }
}
// We need to RUN the WebService (just like how we run a QForm)
ExampleService::Run('ExampleService', 'http://examples.qcodo.com');
コード例 #3
0
ファイル: SmokeTest.php プロジェクト: d1webtop/test-db-acle
 /**
  * @covers \TestDbAcle\Commands\FilterTableStateByPsvCommand::execute()
  * @covers \TestDbAcle\Commands\FilterTableStateByPsvCommand::FilterTableStateByPsvCommand() with placeholders
  * @covers \TestDbAcle\Commands\FilterTableStateByPsvCommand::SetAutoIncrementCommand()
  * @covers \TestDbAcle::getDefaultFactories()
  */
 function test_DatetimeColumnsGetTruncatedWhenComparing()
 {
     $this->setupTables("\n            [address]\n            address_id  |company    |date_of_entry\n            1           |me         |2001-01-01 08:50:00\n            3           |you        |NULL\n\n            [user]\n            user_id |name\n            1       |mary\n\n        ", array('you' => 'John'));
     $exampleService = new ExampleService($this->getPdo());
     $this->setAutoIncrement('address', 1000);
     $exampleService->addEntry("them");
     $this->assertTableStateContains("\n            [address]\n            address_id  |company    |date_of_entry\n            1           |me         |2001-01-01\n            3           |John       |NULL\n            1000        |them       |NOW\n\n            [user]\n            user_id |name\n            1       |mary\n            ", array('NOW' => date("Y-m-d")));
 }